I ve been trying inerhiting my rules with RewriteOptions Inerhit, because for some reason rules are not inerhited by default.You might want to know that I m on a LiteSpeed server.
The IP XXX.XX.XX.XX points to a subdomain which is located in ~/public_html/dir/sub/
This .htaccess is located in ~/public_html/
:
RewriteEngine On
RewriteOptions Inherit
RewriteCond %{HTTP_HOST} ^XXX.XX.XX.XX$ [NC]
RewriteRule ^(.*)$ http://www.example.com [R=301,L]
In ~/public_html/dir/
I have this .htaccess:
RewriteEngine On
RewriteOptions Inherit
And in ~/public_html/dir/sub/
the .htaccess also looks like this:
RewriteEngine On
RewriteOptions Inherit
In this .htaccess there s also some WordPress code below which I also tried to remove but nothing changed.
I also tried to use RewriteOptions Inherit Before
but rules from ~/public_html/ are not applied. So if I go to the IP I m not redirected.
Anyone faced such a problem before and got any tips for me what I cloud try? I really did a lot of search but couldn t figure out what s wrong.