Hello,
I can't make some RewriteRule.
This is a example from Zend Framework that works on Apache 2.2 and 2.4 - On LiteSpeed doesn't
So after few hour i make this:
But this doesn't work:
This line check that file exist successfully (/cache/example.html?xxx=111.html)
This one make redirect not to file, but goes forward: (there is nothing notice about file not exist in LOG file)
But if I change "?" for any other char like , "-", "_" etc. everything works fine.
Summary
If i execute: www.example.com/examle.html?xxx=zzz should be Rewrited to file /cache/examle.html?xxx=zzz.html -> this doesnt work
But if i make rule to: www.example.com/examle.html?xxx=zzz should be Rewrited to file /cache/examle.html_xxx=zzz.html -> this is works
This cond return true:
But this rule not redirect to file:
Is there anybody can help me?
I can't make some RewriteRule.
This is a example from Zend Framework that works on Apache 2.2 and 2.4 - On LiteSpeed doesn't
Code:
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/cache/index.html -f
RewriteRule ^/*$ cache/index.html [L]
RewriteCond %{DOCUMENT_ROOT}/cache/%{REQUEST_URI}.(html|xml|json|opml|svg) -f
RewriteRule .* cache/%{REQUEST_URI}.%1 [L]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
Code:
RewriteEngine On
RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{DOCUMENT_ROOT}/cache/index.html -f
RewriteRule ^/*$ cache/index.html [L]
RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{DOCUMENT_ROOT}/cache/%{CURRENT_URI}?%{QUERY_STRING}\.html -f
RewriteRule ^.*$ %{DOCUMENT_ROOT}/cache/%{CURRENT_URI}?%{QUERY_STRING}\.html [L]
RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{DOCUMENT_ROOT}/cache/%{CURRENT_URI}\.html -f
RewriteRule ^.*$ cache/%{CURRENT_URI}\.html [L]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
But this doesn't work:
Code:
RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{DOCUMENT_ROOT}/cache/%{CURRENT_URI}?%{QUERY_STRING}\.html -f
RewriteRule ^.*$ %{DOCUMENT_ROOT}/cache/%{CURRENT_URI}?%{QUERY_STRING}\.html [L]
Code:
RewriteCond %{DOCUMENT_ROOT}/cache/%{CURRENT_URI}?%{QUERY_STRING}\.html -f
Code:
RewriteRule ^.*$ %{DOCUMENT_ROOT}/cache/%{CURRENT_URI}?%{QUERY_STRING}\.html [L]
Summary
If i execute: www.example.com/examle.html?xxx=zzz should be Rewrited to file /cache/examle.html?xxx=zzz.html -> this doesnt work
But if i make rule to: www.example.com/examle.html?xxx=zzz should be Rewrited to file /cache/examle.html_xxx=zzz.html -> this is works
This cond return true:
Code:
RewriteCond %{DOCUMENT_ROOT}/cache/%{CURRENT_URI}?%{QUERY_STRING}\.html -f
Code:
RewriteRule ^.*$ %{DOCUMENT_ROOT}/cache/%{CURRENT_URI}?%{QUERY_STRING}\.html [L]
Is there anybody can help me?
Last edited: