Multiple Applications / URI Rerouting???

#1
[eluser]Mischievous[/eluser]
I have multiple applications setup and working properly if I do not get rid of the frontend.php in the beginning?

What i'm looking to do is write in .htaccess file

basically something like this...
(trying to get rid of having to have the frontend.php or backend.php in the url)
Frontend =
domain.com/blog
domain.com/wiki
domain.com/cart
etc. etc. but not domain.com/backend

Backend =
domain.com/backend/console
domain.com/backend/menu
domain.com/backend/users
domain.com/backend/components
etc. etc. but all require the initial /backend/

RewriteCond %{REQUEST_URI} = ^/backend.*$
RewriteRule ^(.*)$ backend.php/$1 [L]

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

but its not working....

#2
[eluser]Mischievous[/eluser]
Ok... was able to get it working with:
Code:
RewriteEngine on
RewriteCond $1 !^(frontend\.php|backend\.php|system/templates/|system/shipping|system/media|robots\.txt)

RewriteRule frontend\.php frontend.php [L]
RewriteRule backend\.php backend.php [L]

RewriteCond %{REQUEST_URI} ../backend.*
RewriteRule (.*) backend.php [L]

RewriteCond %{REQUEST_URI} !../backend.*
RewriteRule (.*) frontend.php [L]

However, I'm now having a problem with getting access to my templates css directory which is located at (/system/templates/template/css/)...

Not sure what to do about this? any ideas?

#3
[eluser]Mischievous[/eluser]
Got it working by adding in some more rewrite conditions about each redirect rule Smile


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.