[TYPO3-english] 301 realurl redirects again

Mark Kuiphuis spam at markyourweb.com
Thu Mar 26 13:41:44 CET 2009


Hi Sebastian,

Sebastian Gebhard wrote:
> Yes, Dmitry i did read your blog post 
> (http://dmitry-dulepov.com/article/redirects-typo3-and-realurl-vs-mod-rewrite.html) 
> 
> 
> But for this project i needed a convenient solution and perfomance is 
> not an issue.
> 
> I created some 301 redirects via realurl and they all work except of two 
> and I don't know why.
> 
> I have (old/dead) URLs like this:
> 
> document.htm (works)
> path/ (works)
> path/document.htm (works)
> path1/path2/ (works)
> path1/path2/document.htm (works)
> path1/path2/path3/ (works)
> 
> path1/path2/index.php?param1=value1&param2=value2 (does not work!) => 
> "Segment "path1" was not a keyword for a postVarSet as expected!"
> 
> At every redirect I used relative URLs for the old URLs and absolute 
> URLs for the target URL, and every redirect is 301.
> 
> Then I tried .htaccess and I added to the top of the file:
> 
> Redirect 301 path1/path2/index.php?param1=value1&param2=value2 
> http://www.example.com/newurl/
> 
> Still I get the same error.
> 
> Ideas?

What I found out today..that using only the %{REQUEST_URI} isn't enough. 
You should fiddle around with the %{QUERY_STRING} as well in the 
RewriteCond. The REQUEST_URI doesn't take the parameters after the ? 
into consideration. QUERY_STRING does.


More information about the TYPO3-english mailing list