Link to home
Start Free TrialLog in
Avatar of internetservice_dk
internetservice_dk

asked on

mod_rewrite - strange output

On a site using mod_rewrite I'm experiencing some strange output.

The main site are using the .htaccess file below, to rewrite url's - works fine...

But the subfolder /admin seems to inherit the rewrite behaviour even though this is not wanted - how can I stop this ?

RewriteEngine on
RewriteBase /
 
# Directories to ignore
RewriteRule ^(assets|inc|cms|css|images|img|admin|js|topimages|video)(/.*)?$ - [L]
RewriteRule ^(index\.php)$ - [L]  
RewriteRule ^(mod_redirect\.php) - [L]
RewriteRule ^(balule_mail\.php) - [L]
RewriteRule ^(login\.php) - [L]  

RewriteRule ^(.*)(\.html)$ mod_redirect.php?url=$1$2 [L]
RewriteRule ^([^/]*)/([^/]*)/?$     index.php?lang=$1&url=$2  [NC]
RewriteRule ^([^/]*)/?$    index.php?url=$1  [NC]

In /admin I have a file "login.php" - and it seems like every time I request that file, the server also streams the index file from the main site ?!?

So basicly, I'm looking for a way to stop the inheritance from the parent folders .htaccess file, is that even possible ??

Best regards,
Mark
Avatar of arober11
arober11
Flag of United Kingdom of Great Britain and Northern Ireland image

Stick a .htaccess file in the admin directory with a:

RewriteEngine off
ASKER CERTIFIED SOLUTION
Avatar of Erdinç Güngör Çorbacı
Erdinç Güngör Çorbacı
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of internetservice_dk
internetservice_dk

ASKER

Right to the point :)