vendredi 8 mai 2015

.htaccess: rewrite rules not working as I'd like

Sorry in advance for non technical terms; but keep in mind I really tried a lot to find a solution before posting here.

Under webroot folder i've 2 websites; these are the entry points:

/frontend/web/index.php
/backend/web/index.php

My goal is

  • Access /frontend/web/index.php opening http://domain.tld
  • Access /backend/web/index.php opening http://ift.tt/1uW9qfP

This is my webroot/.htaccess

  RewriteCond %{REQUEST_URI} !^something
  RewriteRule ^(.*)$ frontend/web/$1 [L] 
  RewriteRule ^(.*)/something$ backend/web/$1 [L] 

In this way, domain.tld/ is opening /frontend/web (GOOD), but also domain.tld/something is pointing to frontend/web/index.php instead of backend/web/index.php

Aucun commentaire:

Enregistrer un commentaire