Hi, I want to redirect my website index.php to domain example.com/index.php to example.com My site mostly use index.php?dll=register, index.php?dll=login. So it should redirect only when there is no query string. And, if i login, it will go to index.php again with form fields posted. So, it should not redirect if there is form post. Is that possible? Please let me know how to do this if possible. I did something like this which is not working. #RewriteEngine on #Options +FollowSymLinks #RewriteCond %{THE_REQUEST} ^.*/index\.php #RewriteRule ^(.*)index.php(.*)$ http://www.site.com/$2 [R=301,L] Regards Mahesh
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ RewriteRule ^index\.php$ http://www.digitalseo.info/ [R=301,L] I have done this long back Hope this will help you, let me know..