Here I go. Learning something new. I want to make a mod_rewrite. Basically I have a bunch of dynamic links like this... page.php?id=1 page.php?id=2 page.php?id=3 Well Google is hating them so i wanna make a script works the same way but the urls would be... page/1/ page/2/ page/3/ Now I know that mod_rewrite is the way to go, I just don't know much more. Can anyone help? Or at least point me to a good, not to technical, tutorial. I was at the apache.org site and got information overloaded. Thanks
Here's a simple example with test-cgi, so that it's easy to see the query string: RewriteEngine on RewriteRule ^test-cgi/([0-9]+)/?$ /cgi-bin/test-cgi?id=$1 Code (markup): The part before the space is the regular expression Apache will try to match every request URL to. The regular expression above will match /test-cgi/1 and /test-cgi/1/. Everything that matches the expression inside parenthesis may be put into the resulting URL using $1, $2, etc (positionally): RewriteRule ^test-cgi/([0-9]+)/([0-9]+)/?$ /cgi-bin/test-cgi?v1=$1&v2=$2 Code (markup): This regular expression will match /test-cgi/1/2 and /test-cgi/1/2/. J.D.
Humm... I'll have to give that a try. Thanks. If it doesn't work I'll be back with questions. To bad I won't be able to try it until next week.
This is what I did RewriteEngine on RewriteRule ^product/([0-9]+)/?$ /wrestlingDetails?id=$1 Code (markup): And it didn't work. Old URL: http://www.wrestlingpod.com/wrestlingDetails.php?id=58 New URL: http://www.wrestlingpod.com/product/58/