RewriteRule help
Posted
by Camran
on Stack Overflow
See other posts from Stack Overflow
or by Camran
Published on 2010-06-08T16:57:46Z
Indexed on
2010/06/08
17:02 UTC
Read the original article
Hit count: 241
I have successfully setup htaccess to do this:
domain.com/ad.php?ad_id=bmw_m3_2498224
INTO:
domain.com/ads/bmw_m3_2498224
However, I have a link on the page which makes the page submit to itself... The link saves the ad inside a cookie:
domain.com/ad.php?ad_id=bmw_m3_2498224&save=1 // Note the 'save' variable
I need to make this work on the rewritten rule also, so this link:
domain.com/ads/bmw_m3_2498224/save
will save the cookie...
I have this so far which DOES NOT work for the save part:
RewriteRule ^annons/([a-zA-Z0-9_]+)$ ad.php?ad_id=$1 [NC,L]
How can I include another rule to accomplish what I want?
Thanks
© Stack Overflow or respective owner