Jump to content

how to redirect specific url with htaccess


Recommended Posts

Hello there,

I have a small issue with htaccess Redirect 301, can't redirect those kind of urls:

httpx://siteurl.com/forums/topic/topic_id-topic_title/?do=findComment&comment=post_id

with " /?do=findComment&comment=*"

best solution for me is to redirect those http 404 urls with target at the same topic with

httpx://siteurl.com/forums/topic/topic_id-topic_title/?do=getNewComment

I'm using .htaccess file to manage all redirects at my site, anyone could help with this ? thank you :)

Link to comment
Share on other sites

Those are deleted topic comments indexed a time ago by googlebot (now with http 404 status) and I'm trying to redirect them to any other place with http 301 (moved permanently). Software itself can't handle deleted content and move users to specific place so I'm trying to do this at server level.

Link to comment
Share on other sites

My opinion is that if the content was in-fact deleted, then a 404 response code should be returned in 99% of cases. I realize many don't like to see "errors" listed in Webmaster Tools, but often times this is the appropriate response.

That said, if you wish to redirect the URLs you are free to do so in htaccess. This article explains how to handle query strings (which can't be used directly in a 'Redirect' command).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...