View Full Version : domain.com/yourname redirects
dinkumrocks
June 14th, 2005, 03:01 AM
I was looking around the web, and i saw that on a few sites, (ex. Xanga) if you type in your account name or something after the domain ex. xanga.com/yourname , it would redirect you to xanga.com/home.aspx?user=yourname
i was wondering if anyone knows how they achieved this. And if it has something to do with the server-side language(in my case, asp)
Thanks for any help,
-Naaman
bwh2
June 14th, 2005, 03:17 AM
sounds like a htaccess issue (http://www.kirupa.com/web/custom404.htm), but i'm not 100% sure.
Jeff Wheeler
June 14th, 2005, 03:30 AM
Yes, it's htaccess. Search for info on mod_rewrite.
dinkumrocks
June 14th, 2005, 01:55 PM
thanks. i dont have anytime to look it up right now cause i have to leave, but if anyone knows of a tutorial of exactly waht im looking for, taht would be awsome.
again, thanks for the help,
-Naaman
Jeff Wheeler
June 14th, 2005, 02:05 PM
http://httpd.apache.org/docs/mod/mod_rewrite.html#RewriteRule
λ
June 14th, 2005, 02:28 PM
He's using ASP, so he can't use the goodness of mod_rewrite ;)
Jeff Wheeler
June 14th, 2005, 02:29 PM
Um, why not? ASP can be done with Apache, it's just unusual. I think I remember getting it to barely work on my old Windows box.
JustJeff
June 14th, 2005, 07:06 PM
We do it on www.vobbo.com with htaccess (except it's of the form www.vobbo.com/user/jeff which redirects internally to a PHP script).
blindlizard
June 14th, 2005, 07:37 PM
I am not sure how anyone else does it, and I have never tried it before, but you could create a custom 404 page (file not found). So, when someone enters, mydomain.com/something and the folder something is not there, the custom 404 page will be dislayed. Then in the code of the custom page, look at what was entered and redirect accordingly.
Ankou
June 14th, 2005, 08:43 PM
If you're using Apache then like people are telling you, mod_rewrite is the way to go.
For IIS ... well as far as I know IIS doesn't support URL writting. However ISAPI will let you install an add-on to rewrite URLs.
http://www.iistoolshed.com/ - has a free URL Rewrite add-on (Called URL Rewrite). I've never used it so I can't tell you how well it works or how easy it is to use.
Jeff Wheeler
June 14th, 2005, 09:20 PM
For 404 errors, look at this:
http://www.alistapart.com/articles/perfect404/
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.