Answer the question
In order to leave comments, you need to log in
How to redirect requests to a pack?
Good evening.
Installed Openserver (php7+apache 2.4).
The project has become available at localhost. Then I set up an alias on the /public_html/ folder for the main domain.
All OK. The mobile version of the site is located in the /public_html/mobile/ folder. I set up an alias for it, but requests go to the /public_html/m/ folder, not /public_html/mobile/.
Tell me how to redirect all static and php requests to the /public_html/mobile/ folder
Answer the question
In order to leave comments, you need to log in
If I understand correctly, then we write in .htaccess:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /public_html/mobile/?path=$1 [NC,L,QSA]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question