How to write Rewrite rules for OpenLiteSpeed!
OpenLiteSpeed follows apache style rewrite rules but with a slight difference. However to add rewrite rules you have to go to Webadmin console which ships with OpenLiteSpeed. Inside Webadmin console you can also specify a file from where OpenLiteSpeed can pick rewrite rules for that specific virtual host (domain name). To specify the file you can use this syntax:
1 2 3 4 5 6 |
rewrite { enable 1 rules <<<END_rules rewriteFile /home/example.com/public_html/.htaccess END_rules } |
Here rewriteFile defines the path where you will have your rewrite rules. It is not necessary to name this file .htaccess,…