url rewrite
am 19.12.2006 21:05:01 von musoswire
Hi guys,
I want to give out easier to remember URLs on my site, for Google and also
for users to give out to their friends and such.
Instead of
www.mysite.com/music/viewartist?id=45
i'd like to be able to give out
www.mysite.com/bandname
and instead of
www.mysite.com/music/viewdisc?id=101
id like to be able to give out
www.mysite.com/bandname/disc_name
2 questions..
1) I think I can do this from a custom 404? Could someone give me some idea
of how I might find and disect the directory given by the user, so that I can
query my database and redirect to the correct page.
2) how can I do the redirect without changing what the user sees in her
browser? I'd like it to always show www.mysite.com/bandname etc. Is this
possible?
Cheers
Dan
Re: url rewrite
am 19.12.2006 22:07:29 von Mike Brind
"musosdev" wrote in message
news:7E3E0919-B0A1-46E4-8AD9-BD5186627F45@microsoft.com...
> Hi guys,
>
> I want to give out easier to remember URLs on my site, for Google and also
> for users to give out to their friends and such.
>
> Instead of
> www.mysite.com/music/viewartist?id=45
> i'd like to be able to give out
> www.mysite.com/bandname
>
> and instead of
> www.mysite.com/music/viewdisc?id=101
> id like to be able to give out
> www.mysite.com/bandname/disc_name
>
> 2 questions..
>
> 1) I think I can do this from a custom 404? Could someone give me some
> idea
> of how I might find and disect the directory given by the user, so that I
> can
> query my database and redirect to the correct page.
>
> 2) how can I do the redirect without changing what the user sees in her
> browser? I'd like it to always show www.mysite.com/bandname etc. Is this
> possible?
>
This thread should provide your answers...
http://groups.google.co.uk/group/microsoft.public.inetserver .asp.general/browse_frm/thread/c79c506ef94c3e17/358dd1a9b3b8 8cb3?lnk=gst&q=url+rewrite&rnum=2&hl=en#358dd1a9b3b88cb3
--
Mike Brind
Re: url rewrite
am 20.12.2006 04:32:30 von stcheng
Hi Dan,
for your scenario, what you what to do is commonly called "URL Rewriting",
which means use user/search engine friendly url to replace the underlying
dynamic url(with querystring parameters...). In classic ASP, you should
use some ISAPI filter to do this work. There are some existing 3rd party
IIS ISAPI filters for performing url rewriting:
#URL rewrite in IIS
http://meta.wikimedia.org/wiki/URL_rewrite_in_IIS
#ISAPI Rewrite - URL Rewriting for Windows Server IIS
http://www.seoconsultants.com/windows/isapi/
#URL Rewrite Filter for IIS
http://www.iismods.com/url-rewrite/index.htm
Hope this helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Re: url rewrite
am 25.12.2006 13:29:27 von stcheng
Hi Dan,
Have you got any further ideas or progress on this issue? if you have any
new questions or anything else we can help, please feel free to post here.
Merry Christmas!
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Re: url rewrite
am 25.12.2006 15:32:56 von exjxw.hannivoort
Steven Cheng[MSFT] wrote on 25 dec 2006 in
microsoft.public.inetserver.asp.general:
> Have you got any further ideas or progress on this issue? if you have
> any new questions or anything else we can help, please feel free to
> post here.
>
[please always quote on usenet, this is not email]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)