Hey all, My website has links like this: index.php?id=x index.php?id=x&gal=x How can I make it so I can use http://www.example.com/index.php/id/x andhttp://www.example.com/index.php/id/x/gal/x Thanks
Options +FollowSymLinks +Indexes RewriteEngine on RewriteBase / RewriteRule ^id/([^.]+)/gal/([^.]+)$ index.php?id=$1&gal=$2 [L] RewriteRule ^id/([^.]+)$ index.php?id=$1 [L] example.com/id/x example.com/id/x/gal/x
@Nintendo You just rock in Rewriting .. I remember about 3 years back when you answered my question on url rewriting .. http://forums.digitalpoint.com/showthread.php?t=44559
Thanks so much! Question; Is it possible for when a user goes to example . com to redirect to www . example . com ? Thanks again!
RewriteEngine on RewriteCond %{HTTP_HOST} ^DOMAIN\.com [NC] RewriteRule ^(.*)$ http://www.DOMAIN.com/$1 [R=301,L]