Jump to content

LiteSpeed rewrite rules.

Featured Replies

Posted

In the System > Search Engine Optimization, I get the message You are not running Apache and will be required to manually configure the appropriate rewrite rules for your webserver software. Links on your site will not work until you do this!\

I'm using litespeed it runs the same rewrite rules as apache just want to know how can I find what to put into my .htaccess file.

Taken from /applications/core/modules/admin/promotion/seo.php (lines 443-453):

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase {$dir}
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule \\.(js|css|jpeg|jpg|gif|png|ico)(\\?|$) - [L,NC,R=404]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . {$dir}index.php [L]
</IfModule>

Don't forget to replace "{$dir}" with your installation directory. ;)

$dir = str_replace( \IPS\CP_DIRECTORY . '/index.php', '', $_SERVER['PHP_SELF'] );

It will be great if IPB can provide all rewrite rules needed for Litespeed and Nginx.....

Well, for Nginx all you need is one try_files directive:

try_files $uri $uri/ /index.php?$args;

 

  • Author

It will be great if IPB can provide all rewrite rules needed for Litespeed and Nginx.....

​Well they have the rewrite rule for Litespeed they just don't let you use it out of the box ;)

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.