.htaccess satisfying rewrite rules in wrong order

70 views Asked by At

I am trying to rewrite any blog posts my old forum to the new dedicated subdomain.

Old links are http://www.suzukiclubuk.co.uk/forum/viewtopic.php?p=113363 (topic id changes) and I am rewriting to be http://forum.suzukiclubuk.co.uk/viewtopic.php?p=113363

When testing with https://htaccess.madewithlove.be/ it rewrites correctly

RewriteCond %{HTTP_HOST} ^(www\.)?suzukiclubuk\.co.uk$
RewriteRule ^forum1/(.*)$ http://forum.suzukiclubuk.co.uk/$1 [L,R=301]

However when I test using the full .htaccess file it is satisfying the following prewritten joomla rules:

RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule .* index.php [F]

I am to understand rules are applied from the bottom up and my rewrite rules are at the very bottom.

The question is how do I get my rule to be applied first before any other?

0

There are 0 answers