Hi.
I’ve got a .htaccess file in my web root. Using the .htaccess file I force every request through a single file (frontend.php). Here’s my .htaccess file:
RewriteEngine on
RewriteRule .* frontend.php
As mentioned above, using this .htaccess file every request is forced through frontend.php, so
http://www.mydomain.com/afile.php
http://www.mydomain.com/dirOne/dirTwo/
http://www.mydomain.com/index.php
Will all run exactly the same script (frontend.php).
This works fine, however I want to write a rule to so every request made to an admin alias goes through a separate file (backend.php). So, for example the following URLs would all go through backend.php as they all contain the admin alias.
http://www.mydomain.com/admin/
http://www.mydomain.com/admin/dirOne/dirTwo/
http://www.mydomain.com/admin/index.php
My problem is I’m unsure how to write this within my .htaccess file. Does anyone have any ideas! I’m completely stuck!
Jon