Answer the question
In order to leave comments, you need to log in
How to set up a redirect from a directory to a symlink?
Hello.
Help set up the correct redirect
RewriteEngine On
Options +FollowSymLinks
RewriteCond %{REQUEST_URI} ^/page1/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/page2/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/page3/(.*)$ [OR]
RewriteRule ^(.*)$ webroot/$1 [R=301,L]
RewriteRule ^page1(.*)$ webroot/page1$1
Answer the question
In order to leave comments, you need to log in
But because you didn’t write the OP correctly, it ’s a
smart-ass topic and so awkward that I don’t even use it.
Here is an example of how it works.
RewriteCond %{HTTP_HOST} ^(.*)9918474\.ru$ [NC,OR]
RewriteCond %{HTTP_HOST} ^(.*)site4top\.ru$ [NC,OR]
RewriteCond %{HTTP_HOST} ^(.*)sunnyfruits\.ru$ [NC,OR]
RewriteCond %{HTTP_HOST} ^(.*)u-kit\.ru$ [NC,OR]
RewriteCond %{HTTP_HOST} ^(.*)mediagrup\.ru$ [NC,OR]
RewriteCond %{HTTP_HOST} ^(.*)vmast\.ru$ [NC,OR]
RewriteCond %{HTTP_HOST} ^(.*)desid\.ru$ [NC]
RewriteRule ^(.*)$ http://klondike-studio.ru/ [R=301,L]
RewriteEngine On
Options +FollowSymLinks
RewriteCond %{REQUEST_URI} ^/(page[0-9]{1,}/)(.*)$
RewriteRule ^(.*)$ %1/$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question