0
I am trying to rewrite a URL where the . htaccess file is inside a subdirectory.
Current URL: localhost/Development/Projects/redirect/index.php
URL I’d like to use: localhost/redirect/index.php
My intention is to hide the path to my index.php, not showing that my structure contains 'Development/Projects'. Also, use the . htaccess file inside the redirect folder as I intend to use one htaccess per project.
Htaccess:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^redirect/ ../../../index.php?url=$1 [L,QSA]
Structure:
- htdocs (root)
- index.html
- Developing
- Projects
- redirect
- index php.
- .htaccess
- redirect
- Projects