Answer the question
In order to leave comments, you need to log in
.htaccess redistribution between 3 index files, why doesn't it work?
The task is not solved in any way:
There are three sections with index files on the site, it is necessary that:
1) when accessing the directory "a" (at the root), a redirection to the file "c/a/auth/index.php" occurs
2) when accessing the index file of this directory worked for the "b" directory, and everything after the domain name was written to the variable
3) all other requests went to the index file at the root, and everything after the domain name was written to the variable
My version:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
# /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.pdf|.php|.phtml|.html)
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ $1/ [R=301,L]
# a
RewriteRule ^a/$ /c/a/auth/index.php [QSA,L]
# b
RewriteRule ^b/(.*)/$ /b/?q=$1 [QSA,L]
# c
RewriteRule ^(.*)/$ ?q=$1 [QSA,L]
</IfModule>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question