htaccess

  1. jchambo

    OpenLiteSpeed WordPress VPS 404 Error on Non-Wordpress Site Install in Sub Folder

    I have a One-Click OpenLiteSpeed WordPress install over on a VPS at Vultr, and am trying to install a non-WordPress website into a sub-folder I created. I'd like to say, have https://example.com/test point to a new folder I created in the WordPress root install directory of /var/www/html/test...
  2. L

    wordpress generated .htaccess doesn't work

    I have migrated wordpress website for my client to VPS with Cyberpanel, but I have issue with .htaccess that doesn't work. I checked in multiple configurations but not much worked. Could somebody help me? My .htaccess file content: ``` # BEGIN WP Rocket v3.11.3 # Use UTF-8 encoding for anything...
  3. C

    Website is not obeying rewrite .htaccess data

    I have a website litti.biz, which has SSL certificate. My problem is website is getting redirected to www.litti.biz, even if I have set rewrite rule in .htaccess correctly. Following is content of .htaccess. All other websites are working correctly, only this website has the issue. please...
  4. G

    Allow Access to Multiple IPs with CIDR Notation

    Hi, I have a htaccess rewrite to block all IPs apart from 1 to a certain file like so: <IfModule mod_rewrite.c> RewriteCond %{REMOTE_ADDR} !^123\.243\.16\.228 RewriteRule xmlrpc - [F,L] </IfModule> I want to add multiple IPs, so I would use additional RewrireCond lines but how to add IP...
  5. copperreflections

    How to Redirect all AMP Pages to Non-AMP Pages

    Hi, I deleted the AMP plugin and I would like to Redirect all AMP Pages to Non-AMP Pages. I added this to htaccess RewriteEngine On RewriteCond %{REQUEST_URI} (.+)/amp(.*)$ RewriteRule ^ %1/ [R=301,L] But it does not work. Would you please advise? Thanks, Tony
  6. nawaze

    WHMCS Admin Login Error

    When I am going to login to my WHMCS Admin, its loading to login page again. I got an error log: 2021-11-05 03:56:36.696566 [INFO] [4774] Invalid rewrite directive: <FilesMatch ".(py|exe|phtml|php|PhP|php5|suspected)$"> 2021-11-05 03:56:36.696606 [INFO] [4774] Invalid rewrite directive: Order...
  7. MitchellKrog

    Rewrite rules (.htaccess) not working as per examples

    Hi all As per this page >https://openlitespeed.org/kb/access-control/ RewriteCond %{HTTP_USER_AGENT} !.*google.* [NC,OR] RewriteCond %{HTTP_USER_AGENT} !.*Bing.* [NC] RewriteRule sitemap.xml$ - [F,L] This rewrite rules block everything, even if I pass google as a referrer it doesn't work...
  8. M

    Htaccess issue

    Hello, my apache htaccess working well, but it doesn't work with LiteSpeed. How can i fix it ? Thanks. <IfModule mod_rewrite.c> RewriteCond %{HTTP_COOKIE} !wordpress_logged_in_([a-zA-Z0-9_]*) [NC] RewriteCond %{REQUEST_URI} ^(.*?/?)wp-content/uploads/.* [NC] RewriteRule .* - [F,L] </IfModule>...
  9. S

    Allow access to file only from the server itself

    I'm trying to allow only the server itself to run wp-cron.php and deny this file for the rest of the world, so what I did: RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123 RewriteRule wp-cron.php$ - [F,L] But it doesn't work, any suggestions please?
  10. saz99

    Trailing Slash Error

    I want to add a trailing slash after all my URLs This is the code that I have on my .htaccess RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(.*)/$ RewriteRule ^(.*)$ http://www.domain.com/$1/ [L,R=301] But it is not working. I also restarted...
  11. I

    Installation Of Wordpress In Subdirectory - URGENT

    Hi , i am using litespeed image from aws ec2 instance. after logging in via ssh and generating https certificate. i entered url , it directly installed wordpress in my home directory . although i wanted to install it in blog directory. i followed bellow step : edite .htacess file...
  12. colbyalbo

    WordPress Multisite Sub Directory CSS/JS assets 404 not found for subsites

    Hello, Trying to get a WordPress Multsite installation with Sub-directories setup. Using wordpress 5.4.1, ubuntu 20.04, OLS 1.6.13, Digital Ocean droplet The main site loads everything correctly, but the subsites do not load the CSS or the JS assets. note: the online reference here...
  13. jwbjnwolf

    AddType for parsing PHP in xml files not working

    Hi, I have some RSS feeds being generated from a PHP array. I a while back moved my site to my own server where I run OpenLiteSpeed (reverse proxied through Nginx). My feeds worked fine on the CloudLinux LiteSpeed hosting I used before, with PHP being parsed inside of XML files using this...
  14. C

    Can't configure WordPress Multisite it gives 404 Error

    I' m new to OLS and using OLS with GCP. I want to use WordPress multisite with subdomain I configure wp-config file it works fine but when I tried to edit htaccess file through lite speed cache plugin option and saved it and restart OLS gives 404 error
  15. E

    WordPress Multisite Directory .htaccess

    I installed WordPress Multisite Directory and the suggested htaccess rules dont work my static links are being converted with a trailing slash example: http://domain.tld/directory/wp-includes/js/hoverintent-js.min.js/ current htacces is: # BEGIN WordPress # The directives (lines) between...
  16. soliman18eg

    What is the complete difference beetwen OpenLiteSpeed & LiteSpeed Enterprise? OLS vs LSWS

    I am planning to use AWS for hosting and cyberpanle with just OLS yet not sure. the site will be E commerce use woocommerce on wordpress. and lots of user who are going to have forum and posts. some kind of marketplace. as we see that Cyber Panel has free OLS and in some articles showing the...
  17. P

    .htaccess not loading on subdirectory (2 levels)

    Hello guys, how are you? =) I'm working on hundreds of OLS installations for a managed cloud hosting, and I started to notice a common problem: If I have the following dir structure, the last .htaccess doesn't get read: /srv/user/www/.htaccess /srv/user/www/dir1/.htaccess...
  18. T

    LiteSpeed Slowdown wp !!???

    Did anyone facing this issue ? LiteSpeed keep generating cache files inside wp-content directory !! when I test my site performance with gtmatrix or google or any other site, it says that I should remove that file which under unused css files ! I remove the file and it keep...
  19. S

    CSP Headers aren't being sent

    I am trying to add some CSP headers via .htaccess, and they don't seem to be working. Header set X-Frame-Options "SAMEORIGIN" Header set X-Content-Type-Options "nosniff" Header set X-XSS-Protection "1; mode=block" Header set Strict-Transport-Security "max-age=631138519; includeSubDomains" when...
  20. A

    Context help needed

    I've recently installed OpenLiteSpeed and have been trying to transfer everything over from a shared host. I'm trying to turn my .htaccess files into working contexts but haven't been able to work out how to do so, if I visit my website it always returns a 404. Is anyone able to point me in the...
Top