Apache rewrites

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Apache rewrites

Post by alex.barylski »

I have a setup where there are dozens of scripts each within the document root.

Pages like forums.php, classifieds.php, members.php, profiles.php and so forth.

The web site will eventually be required to meet SEF/SEO standards but here is the caveat.

The core system didn't take into account what it would take to convert URI's from something like:

Code: Select all

members.php?catid=3&groupid=2&sectionid=65
into something like:

Code: Select all

members/athletes/baseball/majorleague
The thing is, the system is built around many applicaiton entry points (as stated above) not a single index.php.

Secondly all the URI's in all the HTML are hardcoded with things like:

Code: Select all

members.php?pkid=3&action=show
Assuming it's possible to go into the HTML source tree and change the URI to something more SEF/SEO is there any way to work around the multiple script entry points using .htaccess

Can I check for the existance of the script name (minus the extension) and use that to route to a mod_rewrite???

Cheers,
Alex
Post Reply