Issues with .htaccess 301 redirect with site on subdirectory
-
Hello,
I have a site installed on a subdirectory that way:
mydomain.com/mysite/
that works fine but, in some cases, when I type?manually?this address as above in the browser it gets redirected to the root domain?mydomain.com.I found this snippet in my .htaccess file, generated by RSSSL:
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteCond %{REQUEST_URI} !wp-content\/cache\/(all|wpfc-mobile-cache) RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]I followed the instructions in your documentation here and I first removed this snippet and also added the “define” line of code in wp-config.php. But I have the following questions:
- First of all, I have to say that removing this snippet solves my problem. But simply removing it and adding that “define” line in wp-config.php is not enough as you also need to go at the settings and switch to PHP redirection, otherwise the snippet gets added anyway…
- otherwise, is there a way to correct this snippet so that it works on sites installed in sub-directories?
Thanks.
- The topic ‘Issues with .htaccess 301 redirect with site on subdirectory’ is closed to new replies.