Hi
I have a working .htaccess code that works well in Apache. But is behaving odd in LiteSpeed server.
Interestingly I tried two LightSpeed hosts and both are behaving differently.
Lets assume I go to:
http://testdomain.com/path/to/index.html
This is what happens in different servers:
Apache:
a. Browser shows I am on:
http://testdomain.com/path/to/index.html
b. Content is shown based on:
http://testdomain.com/?redirected=1&file=index.html
c. http://testdomain.com is WordPress so I get the content based on the logged in user.
LightSpeed Server 1:
Browser shows I am on:
http://testdomain.com/path/to/index.html (GOOD)
Content is shown based on:
http://testdomain.com/?redirected=1&file=index.html (GOOD)
c. Even if I am logged in. This page shows as if I am not logged in. i.e. SESSON/COOKIE information is removed by LightSpeed somehow? (BAD)
LightSpeed Server 2:
Browser redirects to:
http://testdomain.com/?redirected=1&file=index.html (BAD)
Nothing else would work as it is redirected.
The L in [NC,L] should stop it from redirecting but not happening.
I am totally lost, but don't want to say to customers that my software product doesn't work with LightSpeed because I love LightSpeed otherwise.
Additional Information:
Both LightSpeed servers are using cPanel.
Thanks a lot for your help and any guidance you can provide.
I have a working .htaccess code that works well in Apache. But is behaving odd in LiteSpeed server.
Interestingly I tried two LightSpeed hosts and both are behaving differently.
Code:
RewriteEngine on
RewriteCond %{REQUEST_URI} \.(html?|js)$ [NC]
RewriteRule ^(.*)$ /home/test/public_html/?redirected=1&file=$1 [NC,L]
http://testdomain.com/path/to/index.html
This is what happens in different servers:
Apache:
a. Browser shows I am on:
http://testdomain.com/path/to/index.html
b. Content is shown based on:
http://testdomain.com/?redirected=1&file=index.html
c. http://testdomain.com is WordPress so I get the content based on the logged in user.
LightSpeed Server 1:
Browser shows I am on:
http://testdomain.com/path/to/index.html (GOOD)
Content is shown based on:
http://testdomain.com/?redirected=1&file=index.html (GOOD)
c. Even if I am logged in. This page shows as if I am not logged in. i.e. SESSON/COOKIE information is removed by LightSpeed somehow? (BAD)
LightSpeed Server 2:
Browser redirects to:
http://testdomain.com/?redirected=1&file=index.html (BAD)
Nothing else would work as it is redirected.
The L in [NC,L] should stop it from redirecting but not happening.
I am totally lost, but don't want to say to customers that my software product doesn't work with LightSpeed because I love LightSpeed otherwise.
Additional Information:
Both LightSpeed servers are using cPanel.
Thanks a lot for your help and any guidance you can provide.
Last edited by a moderator: