Welcome to WebmasterWorld Guest from 54.145.44.134

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

htaccess

301 redirect

     

shug

8:35 pm on May 26, 2010 (gmt 0)

10+ Year Member



Hello,
I would appreciate your help with a 301 redirect which I am unsure about. I have looked about for an answer to no avail as yet.

I posted my website url on a bulletin board when answering a posting but the link never appeared as intended and subsequently I get page 404 on my logs.

I would like to redirect this example:

http://example.com%22www.example.com to www.example.com/home.php
Thank you for your time.

Regards
Shug

[edited by: jdMorgan at 3:35 am (utc) on May 27, 2010]
[edit reason] example.com [/edit]

jdMorgan

3:49 am on May 27, 2010 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



There's no way to redirect that link, because the domain name is invalid and the request will therefore fail to resolve at the DNS level.

As a result, the request will not be delivered to your server, so your server cannot redirect it.

If the posted URL had had a trailing slash (http://example.com/%22www.example.com), this problem would have been recoverable, because the domain could have then been resolved properly, and you could then have written code to detect the URL-path starting with an encoded quote.

Jim

shug

12:24 pm on May 27, 2010 (gmt 0)

10+ Year Member



Many thanks, Jim for saving me a lot of time - much appreciated.
Regards
Shug

jdMorgan

12:33 pm on May 27, 2010 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Yeah, sorry to have to give a "disappointing" answer, though... :(

Jim