0

I have read a lot of posts on how to rewrite the urls but still I couldn't find a way to rewrite the following:

www.mysite.com/index.php
www.mysite.com/login.html

to appear only like:

www.mysite.com

Any idea?

Shadin
  • 1,867
  • 5
  • 26
  • 37

1 Answers1

2

Generally it should be something like:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?$1 [L,QSA]
</IfModule>

I suggest you look here Remove 'index.php' from URL with .htaccess for a more specific answer and here for a tutorial

Community
  • 1
  • 1
argentum47
  • 2,385
  • 1
  • 18
  • 20