I hate Yahoo and Google....

drmike

Active Member
Jul 8, 2004
31
0
156
Charlotte, NC
Greets:

Maybe someone can help me with a rewrite rule. I have both Yahoo and Google looking for links like this one:

http://www.tdjc.net/index.php/season3/them...mages/down3.gif

Up to the php, it's PHPNuke, the Season3 is from the old pre-PHPNuke site, and everything after that is PHPNuke.

Needless to say, it's wrong. But PHPNuke is feeding the search engines (and you if you view the link) a really, really screwed up verson of my home page. It's also making all the links start with that URL above and making things worse.

Can anyone think of a good rewrite rule that would force the browser/ search engine to http://www.tdjc.net/index.php ?

thanks,
-drmike
 

drmike

Active Member
Jul 8, 2004
31
0
156
Charlotte, NC
Infopro said:
Google is your best friend. Use him and learn. :)
Infopro, may I kindly suggest you rereading that link you provided. It does not cover the issue I'm discussing. It discusses disallowing subdirectories and the like, not forcing the redirection of search engines or visitors due to bad links. It also would not work in this case as the bad links are trying to call index.php a subdirectory instead of the file it actually is.

As to learning Google, I use it many times during the day. I find it a rather poor search engine as many of the links within it are outdated or incorrect. Last month one of my sites had over 900+ incoming links from the engine there were at least 3 years out of date.

As to my orginal question, I came here looking for answers as I've come up empty elsewhere. I would be greatful for any help you can provide.

-drmike
 

drmike

Active Member
Jul 8, 2004
31
0
156
Charlotte, NC
icanectc said:
Why not just setup a redirect in cPanel.

http://www.tdjc.net/index.php/season3/them...mages/down3.gif

or in the last directory where down3.gif is stored put in a htaccess file that redirects to the page you actually want people to get to..

Problem solved.
2,000+ pages (not counting graphics) with each page being accessed by at least 7 and at most 22 different ways. (Which means a different redirect for each and every one of those.) If Apache/ CPanel would have taken the wildcat, I wouldn't be having this issue.

-drmike
 
Last edited:

drmike

Active Member
Jul 8, 2004
31
0
156
Charlotte, NC
Peoplespaces said:
Try a 301 code.
Info here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html Scroll down the page)
Because for the 301 to work, index.php would have to be a subdirectory, not a working file, and Apache/ CPanel would have to take the wildcat which it won't. Remember, whatever/ whomever is coming into my site is thinking that index.php is a directory.

What I'm trying now (And this is the third time I've written this. Theres a real short resign-in on this board so I'm not going to rewrite everything yet again) is I renamed index.php into index2.php, told Apache to use that as the default, and created a fake index.php with a reload meta value into index2.php. The search engines hit during the evening. We shall see.

-drmike
 

gorilla

Well-Known Member
Feb 3, 2004
693
1
168
Sydney / Australia
SOunds all to complicated ,
just dreate an .htaccess file and put this into it

--------------------------------------------------
ErrorDocument 404 http://yourdomain.com/
AddHandler server-parsed html
---------------------------------------------------

and upload this file into the root directory of your site so ALL errors will be redirected to the url you nominate !

Hope that helped :D