Answer the question
In order to leave comments, you need to log in
How to redirect?
I need from this
https://domain.com/current/public/3c/bitovaya-tehnika
to
https://domain.com/3c/bitovaya-tehnika
I try in .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ current/public/$1 [L]
# Handle Authorization Header
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
Answer the question
In order to leave comments, you need to log in
If this is your own server and you have access to the VirtualHost settings, then just add /current/public to the DocumentRoot and you won't have to fool around with .htaccess files.
If shared hosting, then add to the current/public/.htaccess file:
RewriteCond %{THE_REQUEST} " /current/public/(\S*)"
RewriteRule ^ https://%{HTTP_HOST}/%1 [R=301,L,NE]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question