0

I redirect the news with the folling code in htaccess:

RewriteCond %{REQUEST_URI} news-detail\.html
RewriteCond %{QUERY_STRING} L=0 [NC]
RewriteCond %{QUERY_STRING} (tx_news_pi1\[news\]=101|tx_news_pi1%5Bnews%5D=101) [NC]
RewriteRule ^.*$ http://example.net/news/news-detail/8/2016/newstitle? [R=301,L]

The redirect works. Is it possible to use the parameter from QUERY_STRING in RewriteRule? So that every news article is automatically redirected to speaking url. I tried to use some of the parameters from config file but it doesn't work.

realpenx
  • 113
  • 15

1 Answers1

0

You don't get the news title in htacces by the id uid only.

I propose to leave url like they are, use realurl and set a canonical url to the realurl variant

Georg Ringer
  • 7,779
  • 1
  • 16
  • 34
  • Could there be a way, to force speaking url using a solution made with htaccess:RewriteRule & TYPO3:QueryBuilder:Redirect? – jokumer Sep 12 '18 at 11:37