I apologize for the seemingly duplicate question, but none of the dozens that I looked at actually had the same problem.
I have the following directory structure:
/.htaccess /index.php /subfolder/.htaccess /subfolder/index.php
I would like all page requests to be processed using /index.php if the request does not start /subfolder , in which case it should be processed /subfolder/index.php
- eg.
/abc , which will be rewritten to /index.php?u=abc - eg.
/subfolder/def to overwrite /subfolder/index.php?u=def
I spun around, so any help would be greatly appreciated.
EDIT: forgot to mention the problem! Requests inside the subfolder are handled by the index.php root, not the subfolder. (Excluding queries for /subfolder )
Current file contents
/.htaccess Options -Indexes -MultiViews +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^/admin RewriteRule ^(.*)$ /index.php?u=$1 [NC,QSA]
/subfolder/.htaccess RewriteBase /admin/ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /admin/index.php?u=$1 [NC,QSA]
source share