Redirect index.html from Public folder to Subfolder on .htaccess

Viewed 25

I have this .htaccess inside of Public_html folder:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteRule . /index.html [L]
</IfModule>

Currently it is getting the index.html inside the Public_html folder but I need to redirect to index.html inside my subfolder. I tried this but it doesn´t worked:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\subfolder\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteRule . /subfolder/index.html [L]
</IfModule>

What I'm doing wrong here?

0 Answers
Related