[TYPO3-english] Extension for 301 redirects

Mark Kuiphuis spam at markyourweb.com
Thu Mar 26 02:48:27 CET 2009


Mark Kuiphuis wrote:
> Dmitry Dulepov wrote:
>> Hi!
>>
>> Mark Kuiphuis wrote:
>>> I tried to add the following line to my .htaccess: (follow-up on the
>>> redirects in RealURL)
>>>
>>> Redirect 301 /public/?act=latestnews /latest-news/
>>>
>>> Unfortunately this doesn't work and it still shows me the 404 page.
>>
>> I usually use a RewriteRule. For example:
>>
>> RewriteRule ^public/?act=latestnews$ /latest-news/ [R=301,L]

I found a solution (at least for this problem).

Because of the parameters in the URL, I had to use %{QUERY_STRING} 
instead of %{REQUEST_URI}..

The following 2 lines in my .htaccess do the trick:

RewriteCond %{QUERY_STRING} ^act=latestnews$
RewriteRule .* /latest-news/? [R=301,L]

Kind regards,

Mark Kuiphuis


More information about the TYPO3-english mailing list