I'm struggling with a htaccess file.
What I need to do, is do a rewrite rule when the apache version is lower then a certain version, else a different rule.
This is about backreferences that were introduced in apache 2.2.7, but I still need to support older apache versions.
What I want to do is this:
<IfModule mod_rewrite.c>
RewriteEngine On
if API_VERSION <= 2.2.6(or 20051115:5) then
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
else
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L,B]
endif
</IfModule>
I need the 'B' when it's available, anyone know if this can work or get the same result in a different way?