2
   

Google is killing me with an old subdir

 
 
Reply Sun 7 Mar, 2004 04:46 pm
I don't know what to do! A few months ago, I switched my forum from being in root/Forum to root/, at that time google just had the url of topics and such, but now I moved it and it still had everything pointing to /Forum/. Now the problem is that the topic titles and descriptions are with the url, but it's all pointing to /Forum/ and my files aren't there anymore! I setup a custom error script so at least when people go there they will see the header and site, but it still an error page with phpbb skinned over it. Is there anything I can do?
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 2 • Views: 3,144 • Replies: 21
No top replies

 
Craven de Kere
 
  1  
Reply Sun 7 Mar, 2004 04:56 pm
Yeah, put a 301 in place with a mod_rewrite rule.

I'd put an .htaccess file in the sub directory and re route all traffic to root.

Here's example code:

RewriteEngine on
RewriteRule (.*) http://www.able2know.com/$1 [R=301,L]

Basically, this code is saying to take all traffic and route it to the root and give a 301 response.

It's setup so that the actual page will direct to the new page location but you can remove the $1 and have it all just go to the root home page.
0 Replies
 
khisanthax
 
  1  
Reply Sun 7 Mar, 2004 04:59 pm
what's the "$1" do?
0 Replies
 
Craven de Kere
 
  1  
Reply Sun 7 Mar, 2004 05:09 pm
It's a variable.

But the code above might not work. That variable might include the subdir path.

If that is what it does try this:

RewriteRule ^subdirname(.*)$ http://www.rootdomain.com/$1 [R=301,L]

And to explain the caret tells it to look in the request string for the segment that starts after the ^.

Then it looks for a string, use the name of the sub directory.

Then it has a wildcard.

That wildcard is passed on to the $1

So after you do this test the URLs to see what happens, it will probably need to be tweaked till you get it right.
0 Replies
 
khisanthax
 
  1  
Reply Sun 7 Mar, 2004 05:11 pm
so I'll start with:

RewriteRule ^Forum(.*)$ http://www.rootdomain.com/$1 [R=301,L]

no slash after Forum.
0 Replies
 
Craven de Kere
 
  1  
Reply Sun 7 Mar, 2004 05:18 pm
I'm not sure about the slash (or even if you need the sub dir).

Test the first code, if it's just redirecting to the sub dir add the sub dir.

Then test it, if you need a slash add it to the sub dir string or remove it from the end of the domain.
0 Replies
 
khisanthax
 
  1  
Reply Sun 7 Mar, 2004 05:18 pm
Nothing happened. This is what's in my htaccess

ErrorDocument 401 ../errors.php?error=401
ErrorDocument 403 ../errors.php?error=403
ErrorDocument 404 ../errors.php?error=404
ErrorDocument 500 ../errors.php?error=500

RewriteEngine On
RewriteRule ^Forum(.*)$ http://www.rootdomain.com/$1 [R=301,L]

now, my forum uses the rewrite rules, so should I add those rules to the htaccess even though google uses the dynamic links?
0 Replies
 
Craven de Kere
 
  1  
Reply Sun 7 Mar, 2004 05:24 pm
You didn't start with the first code like I said did ya? Try that and see if it works.

Remember that we are talking about the .htaccess file in the sub dir.
0 Replies
 
khisanthax
 
  1  
Reply Sun 7 Mar, 2004 05:29 pm
okay, tried that, replacing the url of course, in the subdir and it didn't work. I just get a 404. When I had the error page replacement lines, it worked when I took out the 301 command which I believe defaults to 302. But I got the error page, not a redirect.
0 Replies
 
Craven de Kere
 
  1  
Reply Sun 7 Mar, 2004 05:38 pm
Ok, this is getting confusing:

Use this in the htaccess file that is in your Forums sub directory.

RewriteEngine on
RewriteRule (.*) http://www.able2know.com/ [R=301,L]

See what happens.
0 Replies
 
khisanthax
 
  1  
Reply Sun 7 Mar, 2004 05:41 pm
it pointed to you =(

just replace the url, right?

it went to thise page

http://www.able2know.com/?t=829&view=next

edit:

I replaced the url and now it goes to my pages but it appends the ? and what comes after to the root
0 Replies
 
Craven de Kere
 
  1  
Reply Sun 7 Mar, 2004 05:45 pm
Yes, replace the URL (I expected you to do that without saying so, lol) and add the $1 to the end of it.
0 Replies
 
Craven de Kere
 
  1  
Reply Sun 7 Mar, 2004 05:50 pm
I've been testing it and it looks like you got it. Please note that the first code i gave you was the solution so if ya'd done what I said (trying it first) all the subsequent testing would have been moot.
0 Replies
 
khisanthax
 
  1  
Reply Sun 7 Mar, 2004 05:51 pm
excellent! It works perfectly now, thank you so much.

Finally I get this as a description for ALL the urls:

:: View topic - Can U name?
... family Check out my sites: http://wierd.domain.com/ http://www.another.com/subdir
http://www.mydomain.com/Forum/portal ...

I get that for all of my urls, wierd.domain.com changes and so does another.com/subdir, they vary a little, mydomain is always there. Do you know why it does this? And I mean for about 8,000 if my pages?

nevermind, it's the sig, I'll just wait that out I guess since there's nothing I can do about that.
0 Replies
 
Craven de Kere
 
  1  
Reply Sun 7 Mar, 2004 05:53 pm
I don't understand the last question, can you PM me the urls and the serps you are asking about?
0 Replies
 
khisanthax
 
  1  
Reply Sun 7 Mar, 2004 05:55 pm
sure.
0 Replies
 
Craven de Kere
 
  1  
Reply Sun 7 Mar, 2004 06:01 pm
I saw the serps they look normal. Isn't that just text from sigs?
0 Replies
 
khisanthax
 
  1  
Reply Sun 7 Mar, 2004 06:10 pm
yeah, that's what I said in the posts above, I just realized it. It kinda stinks but there's nothing to do about it now. Just wait. Hopefully one day google will update my links and the good stuff will be in there.
0 Replies
 
Craven de Kere
 
  1  
Reply Sun 7 Mar, 2004 06:10 pm
I can't see sigs since you are using my mod but I checked cache and it is sigs.

And like I said, the description depends on the query. The queries you are running are atypical. For e.g. if you run allinurl queries on able2know you'll get footer text, because that is where able2know appears as text on the page.

Here's an example. I saw one description pulling text from GodsHappyAngel's sig.

Since he has your domain in his sig the text around his sig is being used in teh descriptions.

This is a perfect example of how removing sig view for guests will help, since you are using my mod this will self-correct.

But remember that nobody is running teh queries you are running, you do it to check the index for your site. Others will not be finding you this way.

Try this query, it'll bring up the same page but will have a different description (use quotes):

"Satan Hates your guts, he is a Lier, and he is weak"
0 Replies
 
khisanthax
 
  1  
Reply Sun 7 Mar, 2004 06:15 pm
Yes I see exactly what you mean. What's wierd is that when I click on see omitted results it's the same description for all the replies, but that's because of the search query? Not all the replies had that as a quote. And how did it find the replies as seperate when there are no links to replies, just topics . . .?
0 Replies
 
 

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » Google is killing me with an old subdir
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.22 seconds on 12/21/2024 at 09:55:06