Jump to content

Need A Bit Of Help With Mod Rewrite In Htaccess.


SuperMAG

Recommended Posts

Suppose i have custom pages like

 

http://www.myfootballcafe.com/page/5/football-fixtures-results-tables/

or

http://www.myfootballcafe.com/page/6/contact-us/

 

I want to remove the page/6/, i want to make it look like this:

 

http://www.myfootballcafe.com/football-fixtures-results-tables/

or

http://www.myfootballcafe.com/contact-us/

 

I checked few examples, but the code was a bit complicated for me to understand. I know you have to make some sort of rule in the mod rewrite. Any help will be appreciated.

Most mod_rewrite applications just redirect to a single page which interprets the URL. There's usually a format such as http://website.com/module/controller/action/arg1/arg2/ but it varies from app to app. The application works out the correct content to show and the MVC architecture apps usually use a Router class.

 

Why is this relevant to you? Because I think, you think all the leg work is done in htaccess when in reality its not. More permanent things could be done in htaccess such as a 301 redirect.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.