Forum Moderators: phranque

Message Too Old, No Replies

rewrite to 301 the?tags needs to be modified

tried a version posted here but no results. please help

         

walkman

10:58 pm on Dec 6, 2004 (gmt 0)



here > [webmasterworld.com...] jdMorgan posted this:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{QUERY_STRING} ^google_doing_this$
RewriteRule ^why\.is$ [mysite.com...] [R=301,L]

a rewrite to 301 any?tags to another file. I tried but I'm ahaving problems. ...maybe becuase of the difference in the?tag so I'm posting mine:

My domains are linked as [mysite.com?tag...] and I entered

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{QUERY_STRING} ^tag$
RewriteRule ^tag$ [mysite.com...] [R=301,L]

it didn't work. what am I doing wrong? A 301 to / would be just as good. I was going to post the follow up there but he suggested that we move any questions here, presumably so others have it easier to find the same solution.

thanks in advance,

jdMorgan

11:43 pm on Dec 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You've got "tag" in the RewriteRule pattern. You need a "page name" there or ".*"
Review the original post carefully, with an eye toward which piece of the original URL goes where.

You may also need a page name in the substitution ("new URL") as well.

Without knowing how your site works, I can't offer more. If you can be more specific about your page names and how (or if) they are involved, that would help.

Jim

walkman

12:41 am on Dec 7, 2004 (gmt 0)



Ok, here I go.

once upon a time I linked from a site of mine to another site with?siteb to track the traffic. Removed the link at least a year ago but the link

http-//www-mysite.com?siteb still shows up with the real index page cache (fairly recent cache too). I have 3 of these tracking urls and they all show as supplemental when I search for a sentence from my front page. Maybe is nothing but I'm afraid that G has them as dupes. My rankings have crashed hard and I can't afford to ignore anything.

as I said, I already removed the links but I want GB to think that mysite.com?siteb is 301d to mysite.com/
Basically, 301 www-mysite.com?siteb to www-mysite.com

thanks again,

jdMorgan

1:14 am on Dec 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So this is needed for the home page only, right? (The code has to be designed to solve an exact problem).

301 www.mysite.com?siteb or www.mysite.com/?siteb to www.mysite.com/

Code for .htaccess in Web root directory:


Options +FollowSymLinks
RewriteEngine on
RewriteCond %{QUERY_STRING} ^siteb$
RewriteRule ^$ http://www.mysite.com/? [R=301,L]

Jim

walkman

1:30 am on Dec 7, 2004 (gmt 0)



Thank you very much,
worked like a charm!

walkman

11:51 pm on Dec 8, 2004 (gmt 0)



not wanting to open a new thread:

should I link to the?whatever_tag from my real index page (or even another site) so Google finds them faster or wait for the monthly update?

any downside to linking to them? What would you do? I'm losing a lot of $$ and if this is it...

jdMorgan

12:20 am on Dec 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Don't link to it from the site that the 301 redirects to, or you'll create a loop!

I dunno, I guess one link from another site to get Google's attention, and then 'correct' that link as soon as it gets spidered... That might be OK. If it was me, I'd install the 301 and leave it alone.

Jim

walkman

7:13 pm on Dec 16, 2004 (gmt 0)



thank you. I removed them from Google completely and left this on the .htaccess (after disabling it to remove them). I was afraid my index itself would be removed but it worked.

is there a way to make so dom.com/?anything goes to the index page? I tried adding a * but it didn't work. It would be great to prevent someone from linking to you either on purpose or innocently. Just in case...by the time I find out someone linked that way, it maybe too late for Google.