I just noticed I have a few different URL's out there to one of my forums. http://www.google.com/search?q=allintitle:arizona+real+estate+forum-resalebroker&hl=en&lr=&filter=0 1. forum/ 2. forum/index 3. forum/index.php? I want to redirect URLs two (2) and three(3) to URL one (1). I've tried this mod_rewrite but it doesn't work: RewriteRule ^real-estate-forum/index(.*) http://www.resalebroker.com/real-estate-forum/ [L,R=301] Anybody have an idea of how to make this work?
How about using this in your .htaccess file this instead of using mod_rewrite: Redirect 301 forum/index [url]http://www.resalebroker.com/real-estate-forum/[/url] Redirect 301 forum/index.php? [url]http://www.resalebroker.com/real-estate-forum/[/url] Code (markup):
That works with the "index" but not the "index.php" and I do not know why. I'm going to have to do some checking into my vBulletin set up. Maybe there is already a redirect in place that I'm not aware of.
Hi J.D., I can get the redirect to work without the question mark. Any ideas on how to get it to work with the question mark? OR... does anyone know how to modify vBulletin URLs to remove the question mark? That is where it's coming from.
It already is working When a visitor requests website.com/index.php?arg=value&arg=value Apache matches the URL path (i.e. /index.php) and redirects the request to the new URL, keeping the query string: website.com/?arg=value&arg=value This is from the Apache docs: J.D.
Yeah, I nipped it in the bud when typing in the code. My mind must be fried. I can't remember how I got that to work. You would think that this would work but it doesn't: Redirect 301 /real-estate-forum/index.php http://www.resalebroker.com/real-estate-forum/ Right now I would be happy with just getting the index.php to redirect to forum/. Any ideas?
There's something very wrong with your setup - your server redirects *every* request to the *same* URL. Most likely you have Redirect 301 / ... somewhere in your configuration. You need to fix this asap - some browsers may get into a loop trying to follow the same link over and over again. Search your main config and any .htaccess files you may have for out-of-place Redirect's. J.D.
If I request /test-url, here's what I get back (I removed a couple of lines for simplicity): HTTP/1.1 301 Moved Permanently Date: Tue, 04 Jan 2005 05:32:55 GMT [b]Location: http://www.resalebroker.com/test-url[/b] Content-Type: text/html; charset=iso-8859-1 Code (markup): The highlighted is the redirection header. As far as I can see, it points to the same server and the same URL. I have seen IE in the past chew up bandwidth trying to retrieve such URLs over and over again. It doesn't seem to happen now, but there could be some other dumb browser that does just that. J.D.
I just checked here and I am not getting that server response: http://www.seologic.com/webmaster-tools/url-redirect.php
That's a different website, isn't it (there's nothing wrong with this one, btw). The response I quoted was from the one you mentioned in the original post - www.resalebroker.com. J.D.
This is what I get: Server Response : www.resalebroker.com HTTP/1.1 200 OK Date: Tue, 04 Jan 2005 06:06:20 GMT Server: Apache/1.3.31 (Unix) PHP/4.3.10 mod_ssl/2.8.18 OpenSSL/0.9.6b FrontPage/5.0.2.2635 mod_throttle/3.1.2
Just checked for HTTP/1.0 and HTTP/1.1 - same result. Here's the complete response header: HTTP/1.1 301 Moved Permanently Date: Tue, 04 Jan 2005 06:10:27 GMT Server: Apache/1.3.31 (Unix) PHP/4.3.10 mod_ssl/2.8.18 OpenSSL/0.9.6b FrontPage/5.0.2.2635 mod_throttle/3.1.2 Location: http://www.resalebroker.com/test-url Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1 Code (markup): The IP address I'm hitting: 64.17.136.90. Can it be that mod_rewrite is getting in the way? J.D.
You had me going there for a minute. That IP address points to http://resalebroker.com and yes I have used a mod_rewrite to redirect it to http://[COLOR=Red]www[/COLOR].resalebroker.com Now if I could just figure out that darn redirect for forum/index.php
I did connect to www.resalebroker.com, not resalebroker.com. My guess is that you have www.resalebroker.com set up as a virtual website then and the redirect kicks in if there's no Host header (btw, you could use DNS instead - would be faster). This one should be simple - just check your configuration step by step. Both Apache 1.3 and 2.0 behave the same way with regards to Redirect and the only thing I can think of is some kind of a typo or conflicting configuration. J.D.
I removed the mod_rewrite to test the server response and it came back HTTP/1.1 200 OK [64.17.136.90]. As soon as I put put the mod_rewrite back I got the HTTP/1.1 301 Moved Permanently. I'm thinking there must be something with the vBulletin software that I'm not aware of. The guy who set that forum up for me knows it inside and out so I'm hoping he can point me in the right direction. [fingers crossed]