After moving my websites to a webhost (shared) which uses LiteSpeed it seems PHP header is ignored.
...
I have tried these variations:
header($s)
But on LiteSpeed these all seem to be ignored while it works on my localhost/Apache and worked on my earlier webhost/Apache. I use the above on a page which handles URL requests that have gone through a mod_rewrite... which is why I need to use header() for reporting when the requested resource is not found. (If it exists appropriate content is instead loaded.)
...
Also worth noting, on both websites I have disabled caching in my .htaccss file
...
also have another website/domain running SMF small machines forum with a "clean urls" module installed (which uses mod_rewrite to support nice looking URLs for forum posts) ... That now also returns "200 - found" for *any* URL - e.g. forum.example.com/flsflisdjlgijsd - while in the past it worked.
...
So I have two very different sites which both suffer from he same problem after switching to a LiteSpeed webhost., and I am getting "soft 404 errors" in Google Webmaster Tools for those two domains now
...
I have tried these variations:
- $s = "HTTP/1.1 404 Not Found";
- $s = "HTTP/1.0 404 Not Found";
- $s = "Status: 404 Not Found";
- $s = $_SERVER["SERVER_PROTOCOL"] . ' 404 Not Found';
header($s)
But on LiteSpeed these all seem to be ignored while it works on my localhost/Apache and worked on my earlier webhost/Apache. I use the above on a page which handles URL requests that have gone through a mod_rewrite... which is why I need to use header() for reporting when the requested resource is not found. (If it exists appropriate content is instead loaded.)
...
Also worth noting, on both websites I have disabled caching in my .htaccss file
Code:
<IfModule LiteSpeed>
RewriteRule .* - [E=Cache-Control:no-cache]
</IfModule>
also have another website/domain running SMF small machines forum with a "clean urls" module installed (which uses mod_rewrite to support nice looking URLs for forum posts) ... That now also returns "200 - found" for *any* URL - e.g. forum.example.com/flsflisdjlgijsd - while in the past it worked.
...
So I have two very different sites which both suffer from he same problem after switching to a LiteSpeed webhost., and I am getting "soft 404 errors" in Google Webmaster Tools for those two domains now
- Is there any option in LiteSpeed I can turn off to get Apache compatible behavior? I have access to cPanel and .htaccess (shared webhost though so there are limits)
- Any other possible explanation and/or solution? Maybe something LiteSpeed is more "harsh" about than Apache or similar?
Last edited by a moderator: