简体   繁体   中英

typo3 auto redirect realurl news

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM