How to configure htaccess to work on subdirectory?

I have two website structure with 2 .htaccess like this:

www > html> .htaccess
www > vhosts > > http > .htaccess

both have this code inside

Options +FollowSymLinks +ExecCGI

<IfModule mod_rewrite.c>
  RewriteEngine On

 # Reroute to index.php
  RewriteCond $1 !^(index.php)
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php [L,QSA]


This allows me to avoid putting index.php in URLs like:


can be used as:


but in the second website if I don’t use index.php isn’t working.

What’s wrong?

Source: Symfony1 Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *