: .htaccess redirect based HTTP_REFERER Our webpage was redesigned and moved to a web CMS platform. This means some of our blog posts shared via Twitter just link to a 404 page. I am wondering
Our webpage was redesigned and moved to a web CMS platform. This means some of our blog posts shared via Twitter just link to a 404 page.
I am wondering if it is possible using .htaccess or something to redirect the HTTP_REFERER to the new blog post page URL.
I have tried the following, however, it wasn't working. The HTTP_REFERER domain should be t.co but I couldn't post that in this message.
# Twitter Redirect old links
RewriteCond %{HTTP_REFERER} ^https://t.co/StrIngOfLeTTeRs
RewriteRule ^ www.example.com/new-blog-permalink/
Not sure where I am going wrong so any advice would be welcome.
More posts by @Phylliss660
1 Comments
Sorted by latest first Latest Oldest Best
Shouldn't you be redirecting the blogs themselves instead? You would need to do so anyway to help the search engines and referral links. That way the page that the t.co links points to will get picked up by the .htaccess file, and then redirect to the new blog permalink.
Redirect 301 /StrIngOfLeTTeRs /new-blog-permalink/
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.