[TYPO3-dev] 301 Redirect Problem

Christopher Torgalson bedlamhotel at gmail.com
Sat Jun 5 00:30:52 CEST 2010


Hello,

On Friday, June 4, 2010, Sebastian Michaelsen <sebastiangebhard at hoch2.de> wrote:
> Am 04.06.10 09:33, schrieb Christopher Torgalson:
>
>
> You can also do this kind of match this way:
>
> RewriteCond %{QUERY_STRING}&?id=821
> RewriteRule index.php http://www.example.com/? [R=301,L]
>
> I did this from memory on a mobile so check for errors, but this way
> should be more efficient than using the "." to match your patterns I
> think. Incidentally, using RealUrl for this purpose is also much less
> efficient than just using mod_rewrite.
>
> I did little benchmarking and came to the conclusion that "^(.*)$" is slightly faster than "index.php".
>
> Time per redirect with..
> "^(.*)$": 45.6ms (0.55 standard deviation)
> "index.php": 48ms (0.00)
> realurl: 196ms (0.70)
>
> With realurl you're absolutely right. I'll consider to do all my redirects in .htaccess
>
> That was interesting, thanks!

That is interesting. Did you also test the RewriteCond with the
unanchored parameter compared to the two grouped dot patterns?

-- 
Christopher Torgalson
http://www.typo3apprentice.com/




More information about the TYPO3-dev mailing list