Hello everyone, tell me how to redirect from www.mysite.ru/index.html to www.mysite.ru/ ? I do this, but it does not work, what is the error?

RewriteEngine On RewriteBase / RewriteCond %{THE_REQUEST} ^[AZ]{3,9}\ \/index\.html\ HTTP\/ RewriteRule /index\.html$ / 
  • 3
    so "/" means the root of the site which, depending on the settings of Apache, will launch the index file. Why do you need from index to index? Or did I not understand something? - dolphin4ik
  • to put it simply, I need www.mysite.ru/ link instead of www.mysite.ru/index.php - Re1aps
  • by default, Apache runs index. I understand you have both php and html indexes. Everything speaks for itself - rename the one that is not needed, or delete it - dolphin4ik

2 answers 2

 DirectoryIndex / RewriteEngine On 
     Redirect permanent /index.php http://altairplus.ru/