htaccess

  1. C

    Custom ErrorDocument is Ignored

    Hello, my shared hosting started using LiteSpeed v8.0.1 Cloudlinux 1.3 recently and I am having issues with my custom 403 page. When I browse this link it should redirect to my custom 403 page (I am using example domain for this thread): https://example.com/electronics/etc/passwd, but it shows...
  2. V

    301 redirection with URL exclusion problem

    Hi. I've been trying to redirect all URLs from an old domain to a new one, except for two specific pages (/contact-form and /about). Here is the code block I have added at the top of .htaccess file just before #Beging Wordpress: RewriteEngine On RewriteCond %{HTTP_HOST}...
  3. W

    How to Troubleshoot and Fix a 406 Not Acceptable Error When Accessing .conf Files in a Specific Directory

    Hello, I am trying to access .conf files in a specific directory on my LiteSpeed web server using an .htaccess file. Although I have added the necessary rules to the .htaccess file, I still receive a 406 Not Acceptable error when attempting to download the files. These .conf files are meant to...
  4. S

    prevent caching for logged-in wordpress users without plugin

    Hi I use asset clean up and Wprocket to speed up Wordpress and cache pages. I do not want to use Litespeed cache plugin but I am interested in using litespeed server-side caching . I use htaccess method to cache pages using litespeed but my problem is that I am unable to prevent showing cached...
  5. Ryder Cragie

    .htaccess Wildcard Redirect Passthrough

    I have the following .htaccess code which does a few things, one of them being that it redirects 1.example.com to example.com/1, which works great. But I also need it to redirect 1.example.com/2 to example.com/1/2 as well, and it does do that BUT it adds a trailing slash if no path is specified...
  6. Ryder Cragie

    (NOW FIXED)

    I have hosting set up on a wildcard on my domain (*.example.com) and I would like to have the following type of redirect: whatever-the-user-types-here.example.com > example.com/whatever-the-user-types-here Does anyone know the code for this please? This would make my day if someone could help...
  7. H

    .htaccess files not being used

    I have the following folder structure domain.com (/public_html/) sub.domain.com (/public_html/sub/) sub.domain.com/dir1/ (/public_html/sub/dir1/) sub.domain.com/dir1/dir2/ (/public_html/sub/dir1/dir2/) if I put the following in...
  8. W

    Limit POST in htaccess

    In Apache, I use the following htaccess file to require basic authentication on POST requests only. On litespeed, this same block requires basic auth for all requests, including GET which I want to make openly available. <Limit POST> AuthType Basic AuthName "Restricted Content"...
  9. M

    htaccess need file blocking

    settings fixed. There is only one problem. public_html/resources/views/web/inc/header.blade.php --> no-cache? is it done? need file blocking how to .htaccess.php <IfModule LiteSpeed> RewriteCond %{ORG_REQ_URI} !/login RewriteCond %{ORG_REQ_URI} !/register RewriteEngine On RewriteRule .* -...
  10. K

    Rule: only cache posts older than x days

    Hello I am using ls Cache. Can we create a rule such as "Do not cache for posts published in the last 3 days" with the .htaccess file? I just want to cache for old posts but I couldn't. edit:I do not use plugins. I activate the cache with htaccess. I use cpanel + litespeed on my server.
  11. S

    Litespeed ignores expr in .htaccess (mod_headers)

    Hi, I need to overwrite via htaccess the cache-control response header with the value of a custom http response header. On Apache I use the following line: Header always set Cache-Control "expr=%{resp:x-my-custom-header}" but doesn't work on Litespeed. Seems that litespeed does not support...
  12. J

    Conditional X-Frame-Options

    Hi! I am trying to set X-Frame-Options for all pages except all pages of this path: ^/mypath/ Whatever I have tried it won't work. For example, using the below code in my .htaccess I always end up with "deny" - even if I switch my condition check from !~ to =~ I still get "deny" for the pages...
  13. B

    htaccess apache to litespeed (mb some syntax problem)

    Hello, got a such problem, some clients come on a wrong link cause of converted special symbols: they got /%23search instead of /#search (anchor link) So in apache should work well this phrase: RewriteRule ^(.*)?%23(.*)?$ $1#$2 [NE,R=301,L,B] On my shared hosting with litespeed it doesn't...
  14. P

    htaccess odd behaviour

    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. RewriteEngine on RewriteCond %{REQUEST_URI} \.(html?|js)$ [NC] RewriteRule ^(.*)$...
  15. W

    htaccess from Apache to Litespeed

    Hi there, I am trying out Litespeed, but having a hard time making mod rewrite work. Can anyone help me make this htaccess file works on LS, please! Thank you so much!
  16. V

    [solved] htaccess environment variable assignment fails in LSWS but works in Apache

    I've been trying to configure CORS headers on my hosting company's LiteSpeed Web Server via .htaccess, but I've run into what seems like a bug with LiteSpeed's handling of environment variables. The hosting company upgraded my instance to the latest LSWS 5.2.7 to see if that would help, but the...
  17. S

    Migrate Apache2 htaccess to Litespeed

    Hallo, im so newbie in Litespeed, usually i use nginx and apache, so i have problem when my web hosting migrate to litespeed, here bellow is my .htaccess on apache2: RewriteEngine on RewriteCond $1 !^(index\.php|home\.txt) RewriteRule ^admin/ index.php/admin/index/admin/ RewriteRule ^admin...
  18. J

    [Solved] Setting CORS (cross-origin resource sharing)

    Hi, Was hoping someone could help us setting up a rule in .htaccess for CORS policy for Access-Control-Allow-Origin. We found a bunch of posts on StackOverflow relating to this, all with the same general proposed solution. We implemented the accepted solution trying a variety of variations ...
  19. G

    WordPress Multisite, Network Admin, CDN and .htaccess.

    Hello Litespeed and users, I have a question about WordPress Multisite, Network Admin, CDN and .htaccess. I have my multisite running on Litespeed Web Server with the Litespeed Cache plugin. Question Network Admin: I noticed that i have no Litespeed options in the netwotk admin...
  20. G

    [Resolved] Wordpress Multisite - Network Admin - CDN - .htaccess

    Hello Litespeed and users, I have a question about WordPress Multisite, Network Admin, CDN and .htaccess. I have my multisite running on Litespeed Web Server with the Litespeed Cache plugin. Question Network Admin: I noticed that i have no Litespeed options in the netwotk admin...
Top