This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions
 Helicon Tech : Common Questions
Subject Topic: need help with a rewiter rule Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
bwnbwn
Newbie
Newbie


Joined: 18 October 2006
Online Status: Offline
Posts: 10
Posted: 10 May 2010 at 10:26am | IP Logged Quote bwnbwn

I need some advice here. I have searched till I am at a loss. I am trying to make this url a 404 www.example.com/products/?q=anything from being a live url for duplicate content reasons or www.example.com/?q=something from being a live url 

I do not have any rewritten url's they are all static .htm pages

The site is a static site except for my search fuction. The search is something like this www.example.com/search.asp?searchterm=search term

When I tested the ?q=something all my url's will throw a 200 so I have looked for a solution. I tested some of the coding given but it won't work for my site. Any suggestions would be greatly appreciated.

Back to Top View bwnbwn's Profile Search for other posts by bwnbwn
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 11 May 2010 at 4:13am | IP Logged Quote Anton

Ok, let me clarify a bit.
Do you need to redirect either www.example.com/products/?q=anything or www.example.com/?q=something to 404 error page?

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
bwnbwn
Newbie
Newbie


Joined: 18 October 2006
Online Status: Offline
Posts: 10
Posted: 11 May 2010 at 8:38am | IP Logged Quote bwnbwn

Anton wrote:
Ok, let me clarify a bit.
Do you need to redirect either www.example.com/products/?q=anything or www.example.com/?q=something to 404 error page?

Sorry for the bad post I wasn't thinking.

here is the issue. I have Helicon installed on the server Isapi-rewrite3. I use it for several basic fuctions 301's and several other applications but no url rewrites.

This is a static .htm site. I am an SEO and have been reading that people doing black hat seo are linking to sites using the above against them from duplicate content.

Right now on my site if I add the ?q=keyword-keyword

or

?q=something

this throws a server header 200.This makes this live page/s and can have negative effects on SEO.

So yes I want it to throw a 404 I have a custom 404 page built and use IIS to direct the user to the custom 404 page.

I do want to add I have a search fuction on the site that uses

http://www.example.com/search.asp?searchterm=anything that I do not need to mess with in the rewrite rule.

I hope my more detailed post will help in finding a way to get this done.

Thank you very much,

Joseph

Back to Top View bwnbwn's Profile Search for other posts by bwnbwn
 
bwnbwn
Newbie
Newbie


Joined: 18 October 2006
Online Status: Offline
Posts: 10
Posted: 11 May 2010 at 8:42am | IP Logged Quote bwnbwn

Sorry for the add I have the non www already redirected back to the www so the non www isn't needed in the rule.

http://www.google.com/?q=something is a good example

http://www.helicontech.com/?q=something another one this is the exact thing I need.

Back to Top View bwnbwn's Profile Search for other posts by bwnbwn
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 12 May 2010 at 2:16am | IP Logged Quote Anton

Please try to use smth like this:

RewriteBase /
RewriteCond %{QUERY_STRING} ^(?!searchterm=.+).+$ [NC]
RewriteRule .* custom404.htm? [R=301,L]

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
bwnbwn
Newbie
Newbie


Joined: 18 October 2006
Online Status: Offline
Posts: 10
Posted: 12 May 2010 at 8:06am | IP Logged Quote bwnbwn

Thank you very much that is a fix.
Back to Top View bwnbwn's Profile Search for other posts by bwnbwn
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum