Rewrite fetch file flag?

Marcus

Well-Known Member
#1
Hi,

I was wondering whether there's an option with the rewrite rules to completely stop all rewrites and try to fetch the file. My current (context-specific) rewrite rules are:

RewriteCond %{REQUEST_URI} .shtml$
RewriteRule .* - [L]

RewriteCond %{HTTP_COOKIE} lang=(en|fr|tr)
RewriteRule ^(.*)$ $1/%1.shtml [L]

RewriteRule ^(.*)$ $1/en.shtml [L]

The reason why the first rule is in there is because the two lower rules (which just select an SSI file from a list of languages) redirects the request back to the same directory, and the rewrite rules are read again.

I'd like something like

RewriteCond %{HTTP_COOKIE} lang=(en|fr|tr)
RewriteRule ^(.*)$ $1/%1.shtml

RewriteRule ^(.*)$ $1/en.shtml

Where a flag would be something like 'break', and would then immediately look on the filesystem or check for script handlers.

If this isn't currently possible, could this be added?
 

mistwang

LiteSpeed Staff
#2
You can put the rewrite rule at vhost level instead of context level, vhost level rewrite rules is more likely to be processed only once.
 
Top