First I want to thank the OpenLitespeed community for making this amazing fast webserver!
We have moved our site to a new server with openlitespeed.
Now we are stuck at some rewrite rules.
Maybe someone from this forum can help us?
our site is: https://www.cazin.net/
now we need a rewrite rule for:
https://www.cazin.net/vjesti/sitemap should go to https://www.cazin.net/sitemap.xml
this code above won't work.
also we want to redirect all mobile browsers to our mobile optimized page:
https://www.cazin.net/mob
yes, this code above also won't work
and now here is our actual rewrite code for our site (all other stuff is working)
Thanks for any help!
makcode
We have moved our site to a new server with openlitespeed.
Now we are stuck at some rewrite rules.
Maybe someone from this forum can help us?
our site is: https://www.cazin.net/
now we need a rewrite rule for:
https://www.cazin.net/vjesti/sitemap should go to https://www.cazin.net/sitemap.xml
Code:
RewriteRule ^sitemap.xml$ vijesti/sitemap [L]
also we want to redirect all mobile browsers to our mobile optimized page:
https://www.cazin.net/mob
Code:
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [NC]
RewriteRule ^$ https://www/cazin.net/mob [L,R=302]
and now here is our actual rewrite code for our site (all other stuff is working)
Code:
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{THE_REQUEST} !/system/.*
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,L]
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
makcode