Hide index.php from web site URL

Posted by Gusepo on Stack Overflow See other posts from Stack Overflow or by Gusepo
Published on 2010-04-17T17:30:14Z Indexed on 2010/04/17 17:33 UTC
Read the original article Hit count: 174

Filed under:
|

Hi, I'm using htaccess rewrite engine to make urls look nice, from www.mysite.com/index.php?pag=home to www.mysite.com/pag/home

it works fine with this rule

RewriteRule ^pag/([^/]+)$ index.php?pag=$1 [L,QSA,NC]

but when I go to www.mysite.com it redirects me to www.mysite.com/index.php is there a way to redirect to www.mysite.com/pag/home?

I tried

redirect 301 /index.php http://www.mysite.com/pag/home

but when i try to go to www.mysite.com the browser gives my "page do not exsist error"

© Stack Overflow or respective owner

Related posts about redirect

Related posts about .htaccess