![]() |
Mod Rewrite Question
Hello!
I have an site where I use links as: http://www.domain.com/gallery.php?id=12 Now I want to let it mod rewrite that it can also be accessed by: http://www.domain.com/gallery/12/ I heard it could be done with mod rewrite in your .htaccess, I tried many things but I don't get it to work, who can help me? |
bump
|
Try this rule:
RewriteRule /gallery.php?id=([0-9]+) /gallery/$1/ |
Quote:
|
did you put:
RewriteEngine on |
Quote:
Code:
RewriteRule /gallery/([0-9]+)/ /gallery.php?id=$1 |
Yeah I was just about to post that the original example looks backwards :)
Assuming you want people to link to your dynamic page using a simple url as you said, then flip the parts around as dgraf said.. |
Quote:
|
All times are GMT -7. The time now is 01:07 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123