Forum Moderators: phranque
BUT, there are many incoming hyperlinks that point to this page with URL's like this:
http://example.com/archive/
http://example.com/archive/?by=date
http://example.com/archive/?by=country
http://example.com/archive/?by=country#England
I guess I should note that there are other URL's further down the path that feed off the /archive/ directory... those should stay put.
I was trying something along these lines, with no success:
rewriteEngine On
RewriteCond %{QUERY_STRING} ^by=(.*)$
rewriteRule ^/archive/index.php$ [subdomain.example.com...] [R=301,L]
Thoughts?
rewriteEngine On
rewriteCond %{HTTP_HOST} !^example\.com/archive/index.php
rewriteCond %{QUERY_STRING} ^(.*)$
rewriteRule ^(.*)$ [subdomain.example.com...] [R=301,L]
Only problem is that it's also doing items (URLs) deeper into the archive directory as well...
Oddly, this seems to do nothing at all... no sign of any change. ... though the code previous changed everything just fine, with the exception that it was also impacting the URLs below the archive level.
Is there a way to add an ignore clause into that one? I'll take over-complicated over non-functioning. :)
//craig