| 1:57 pm on May 10, 2007 (gmt 0)|
Are you doing this within IIS or using a script to evaluate and rewrite the URL?
I am working on the same thing as you but I also want to include a way to handle typo domains.
| 3:15 pm on May 10, 2007 (gmt 0)|
|Anyone have any suggestions? |
Look into isapi_rewrite
| 6:21 pm on May 20, 2007 (gmt 0)|
Yes, it's impossible to redirect http://www.example.com/default.asp to http://www.example.com as you said. Basically I enquired about this on here about a year ago when the duplicate penalties were occuring with Google because of the www and non www issue.
There's only 3 options in my view:
IIS, which is not possible on shared hosting
ISAPI, which again is not an option if you're on shared hosting
or if you are having problems because search engines have indexed www.example.com and www.example.com/default.asp as identical then you should re-save the default.asp file as index.asp (as an example) and do a 301 redirect to the root.
Then go through your site thoroughly and make sure there are no direct links to default.asp and instead things link to the root.
It is possible however (and worthwhile) to 301 redirect http://example.com/default.asp to http://www.example.com
Hope this helps
| 12:12 pm on May 21, 2007 (gmt 0)|
|ISAPI, which again is not an option if you're on shared hosting |
Some hosting companies will install isapi_rewrite, or similar, if you pay for the license.
You may have to look around a bit, but there are many that do it.
| 8:12 pm on May 25, 2007 (gmt 0)|
Rather than using third party tools, you can do a lot in the Application_BeginRequest event in Global.asax.vb. You can intercept specific pages using:-
and do some pretty sophisticated things using...
It is pretty much what Isapi filters do but within .NET itself.
| 9:21 pm on May 26, 2007 (gmt 0)|
Assuming you're running a windows server, you'll notice that the default documents are configured with captial letters:
You can 301 redirect http://www.example.com/default.asp to http://www.example.com/ just by checking for the capital (if 'default.asp' then redirect, if 'Default.asp' then dont.)
Of course, it's not 100% perfect, because http://www.example.com/Default.asp exists as a duplicate but you're not likely to be linking internally using a capital letter anywhere in your website and most likely neither is anyone else.
[edited by: Panic_Man at 9:23 pm (utc) on May 26, 2007]