Answer the question
In order to leave comments, you need to log in
How to prescribe the redirection of certain requests using mod_rewrite?
Good afternoon dear minds. Due to the fact that my knowledge in .htaccess is close to 0, I have to turn to you for help.
there is a project (I give the structure below)
/www
/folder_01
index.php
..htaccess
/folder_02
index.php
..htaccess
/folder_03
index.php
..htaccess
index.php
.htaccess
In the folder_01 folder there is a self-written script that works on the www principle .site.com/controller/action/
at the root of the /www directory in .htaccess the following is written
AddDefaultCharset utf-8
DirectoryIndex index.php
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)$ folder_01/index.php [QSA,L]
</IfModule>
AddDefaultCharset utf-8
DirectoryIndex index.php
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !(.*)\.(css|js|png|jpg|gif|ico)
RewriteRule ^(.*)$ index.php?_url=$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