simple rewrite problem

Discuss practical ways rearrange URLs using mod_rewrite.

simple rewrite problem

Postby hpower » Sun Jul 27, 2008 8:11 pm

i am a newbie and have a problem writing a rewrite.

http://top-guides.info/?V*Yellow+Tomato+Sauce

i want to rewrite this to something more SEf

"R" is a php file GETTING an entry "yellow tomato sauce" from dB.

i have tried to write some code, without success, can anyone please guide me to make it SEF.

http://top-guides.info/recipe/Yellow_Tomato_Sauce

help much appreciated.
Last edited by hpower on Wed Jul 30, 2008 1:07 am, edited 1 time in total.
hpower
 
Posts: 2
Joined: Sun Jul 27, 2008 12:02 pm

Postby richardk » Tue Jul 29, 2008 11:32 am

What have you tried?

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^recipe/([^/]+)/?$ /R?V*$1 [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby hpower » Wed Jul 30, 2008 12:33 am

thanks for your reply
i did try that and alot of other stuff ( hehe)

but i still cannot get any SEF urls.

http://top-guides.info/?V*Veal+Glaze+-+Master+Chefs

i am sure you already know this....

"V" is a php file calling "Veal+Glaze+-+Master+Chefs" from db
hpower
 
Posts: 2
Joined: Sun Jul 27, 2008 12:02 pm

Postby richardk » Wed Jul 30, 2008 3:58 pm

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^recipe/([^/]+)/?$ /?V*$1 [QSA,L]


What happens when you go to /recipe/Yellow+Tomato+Sauce?
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: No registered users and 69 guests

cron