[TYPO3-dev] 301 Redirect Problem
Sebastian Michaelsen
sebastiangebhard at hoch2.de
Fri Jun 4 09:00:20 CEST 2010
I keep failing setting up a simple 301 Redirect and it drives me mad.
For most redirects on this website I use realurl 301 redirects. They are
fast and easy to set up, but they do not match URLs with a page id
paramter like ?id=821 (or i there way to redirect these with realurl?)
So I wanted to use Rewrite Rules in .htaccess to handle them.
This specific page I want to redirect to the home page:
RewriteCond %{QUERY_STRING} (.*)id=821(.*)
Rewriterule .* http://www.example.com [R=301,L]
=> The rule does not match, no redirect happens, 404 occurs
RewriteCond %{QUERY_STRING} (.*)id=821(.*)
Rewriterule ^(.*)$ http://www.example.com/$1 [R=301,L]
=> The rule matches but keeps redirecting in a loop
RewriteCond %{QUERY_STRING} (.*)id=821(.*)
Rewriterule ^(.*)$ http://www.example.com/ [R=301,L]
=> The rule matches but keeps redirecting in a loop
Tried a few other variants but no success. Can't be such a big deal, can it?
Thanks in advance for your hints!
Kind regards,
Sebastian
More information about the TYPO3-dev
mailing list