Forum Moderators: phranque
We have a folder /late-deals/?m200067with non valid query strings
How do we get rid of these, and does the rule go into the root htaccess or the late-deals/ folder
I have tried
RewriteCond %{query_STRinG} &?m([0-9][0-9])$
RewriteRule ^late-deals$ http://www.example.com/late-deals/? [R=301,L]
Which did nothing..
And
RewriteCond %{query_STRinG} ^m
RewriteRule ^late-deals/$ http://www.example.com/late-deals/late-deals/? [R=301,L]
Many Thanks and Merry Christmas to you all
[edited by: jdMorgan at 4:56 pm (utc) on Dec. 23, 2006]
[edit reason] Examplified. Please see TOS. [/edit]
RewriteCond %{[b]QUERY_STRING[/b]} &?m[b][0-9]+&?[/b]
RewriteRule ^late-deal[b]s/?$[/b] http://www.example.com/late-deals/? [R=301,L]
I assume you already have other working rules in that file, so I have omitted the mod_rewrite 'setup' stuff.
Jim
This rule does nothing
The late-deals folder is a wordpress blog if this makes any difference.
We use this rule for eg
RewriteCond %{QUERY_STRING} .
RewriteRule ^corfu-weather-forecast\.htm$ http://www.example.com/corfu-weather-forecast.htm? [R=301,L]
to kill of invalid strings on pages and it works a charm
However on this folder we have a problem
DirectoryIndex index.php
RewriteEngine on
Options +FollowSymLinks
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule \.htm$ - [G,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /late-deals/
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule . /late-deals/foo.php [L]
</IfModule>
# END WordPress
Thanks
[edited by: jdMorgan at 5:36 pm (utc) on Dec. 23, 2006]
[edit reason] Examplified. [/edit]