Forum Moderators: open
I want to rewite the dynamic urls on a clients ASP site (IIS/5) to static looking urls.
Have never done this before, and am looking for an easy to follow step-by-step guide.
I'm sure there must be some top notch threads in here, but is getting time consuming wading through them all.
Cheers
Check out both: Introduction to mod_rewrite [webmasterworld.com]
And: mod_rewrite Documentation [httpd.apache.org]
Also look at anything here by jdMorgan. He's the man.
in mmc register a custom 404 handler of type URL, not file.
create default.asp that you will use for custom error
handler.
eg. /catalogue/default.asp
will catch all errors in /catalogue and lower
in default.asp you will find the failed request string
is readable as a variable, i think http-referer, just
enumerate through them all as an experiment.
parse the failed request to determine the page output.
you may want to use server.execute() to make maintenance
easier
++++
[motobit.com...]
I would stay away from anything that is going to generate a 404 as your log files are going to be littered with 404 requests.
The most important part of this entire process is planning your URI structure. The shorter the string, the better. If you can eliminate any of the variables (directory path) in the URI, go ahead and plan for that now as you'll be able to keep the URI strings short and sweet which makes them very user friendly.
For example, if you can take something like this...
www.example.com/sub/sub/sub/
(The above URI is what you may end up with after a rewrite.)
...and trim out one of the variables so you end up with something like this...
www.example.com/sub/sub/
You'll be much better off in the long run. The goal is to make the URIs as short (and shallow/directory depth) as possible so they are friendly to users and spiders.
Also i can't find the config file anywhere.
So far i favour IIS Rewrite simply because i got it going and doing what i want without problem. I can copy the dll into as many folders as i want to run multiple webs off of it.
ISAPI Rewrite talked of better support for virtual servers but the demo doesn't support this, which makes it hard to test (and this is one of my main criteria)
Not having to restart IIS is a great bonus especially as it won't be approprite in the live enviroment. Plus its only $69 which is pretty good.
pageoneresults whats the virtual server support like? can you dump a config file for each web in its own folder (one below root) for config by the user?
Thanks
Think I may have to get a couple of clients together who would benefit and see if they will absorb the cost.
Hehehe, the $69.00 is pocket change compared to what you will probably charge to set up the config file. There is some planning to do along with URI structuring. The $69.00 can easily be absorbed into the overall proposal for URI Rewriting.
The config file which liturally be changing say /product255.htm to /product.asp?ref=255 so one line config for each site...
Even so, i guess i could proabably quite easily absorb the costs
Thanks for all your help and suggestions pageoneresults, your experience is much appreciated :)
do i understand correctly that once installed i can have the .ini file within my root folder so that i can make changes as i go along if neccesairy without a restart.