Need Help With Rewrite

Discuss practical ways rearrange URLs using mod_rewrite.

Need Help With Rewrite

Postby dvdsero » Sun Aug 16, 2009 10:55 pm

Hi

I want to make a rewrite who can do the following:

filename.php - should be: buy-product-filename.html

Except

checkout.php which should be the same

some files starting with _ should be the same

and a few files (i know the filenames) should not use the ordinary rewrite but instead filename.php should be filename.html.

Would be glad if you could help me!
dvdsero
 
Posts: 18
Joined: Tue Dec 09, 2008 10:05 pm

Postby richardk » Tue Aug 18, 2009 3:55 pm

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^buy-product-([a-z]+)\.html$ /$1.php [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: Google [Bot] and 26 guests

cron