Hello,
We are looking for a way to disable .htaccess rewrite rules if a specific condition si met directly from the vhost.
Our idea was to write a rewrite rule that finishes with [L] directly in a vhost include file so other rules are not triggered.
The following rule works if added to the beginning of a .htaccess file but not if added to the virtualhost directly.
Do you have any ideas how I could achive this on our LiteSpeed servers ?
Here is the rule we tried adding :
Can you see a reason whay it's not working when directly added to the vhost ? Some findings seem to say that I would have to specify a directory. But unless this directory can be specified from a variable of some sort I don't see how this would be possible.
If it's not possible with Apache standard rules, Is there a litespeed sepicific way to achieve this ?
The reason for doing this is we do not approve with the current method cPanel is panning which is to edit all rewrite rules in .htaccess files. We want to try and avoid user's rules from being edited.
We are looking for a way to disable .htaccess rewrite rules if a specific condition si met directly from the vhost.
Our idea was to write a rewrite rule that finishes with [L] directly in a vhost include file so other rules are not triggered.
The following rule works if added to the beginning of a .htaccess file but not if added to the virtualhost directly.
Do you have any ideas how I could achive this on our LiteSpeed servers ?
Here is the rule we tried adding :
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^\/[A-F0-9]{32}.txt(?:\ Comodo\ DCV)?$ [OR]
RewriteCond %{REQUEST_URI} ^\/[0-9]+\..+\.cpaneldcv$ [OR]
RewriteCond %{REQUEST_URI} /\.well\-known\/acme\-challenge
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule (.*) $1 [L]
</IfModule>
If it's not possible with Apache standard rules, Is there a litespeed sepicific way to achieve this ?
The reason for doing this is we do not approve with the current method cPanel is panning which is to edit all rewrite rules in .htaccess files. We want to try and avoid user's rules from being edited.