View Full Version : Mod_Rewrite changed url
destruction
06-13-2009, 08:28 PM
How to changes the url from
http://mydomain.com/index.php to http://mydomain.com/?id=1
What i've should to write the command on .htaccess?
Thanks for any help..
schleppel
06-17-2009, 12:37 AM
What exactly should happen? Which URL will the user visit?
destruction
06-20-2009, 06:55 PM
how do you redirect from :
www.mydomain.com/index
to :
www.mydomain.com/index?id=1
like that :) sorry late for reply.
Inigoesdr
06-20-2009, 10:45 PM
It sounds like you want something like this:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/index$
RewriteCond %{QUERY_STRING} !id=
RewriteRule .* /index?id=1 [R=301,QSA,L]
destruction
06-25-2009, 08:17 AM
Inigoesdr: Thanks alot mate :) it worked
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.