I think I've posted this one before, but I haven't found a good solution yet. I'm hoping some fellow dreamhosters have some ideas:
I want to set up some URL rewrite scheme in my .htaccess file in order to remove parts of the URL (marked red below).
My site is driven by a script in the /bin/ folder, and the script reads a folder and a filename: [color=#00CC00][color=#CC0000]/bin/view[/color]/Main/WebHome[/color] = "[color=#CC0000]view[/color] the [color=#00CC00]WebHome[/color] page in the [color=#00CC00]Main[/color] folder". This means that my URLs are long and ugly: http://g-b.dk[b][color=#CC0000]/bin/view[/color][/b]/Main/WebHome
I want to be able to type: [color=#00CC00]http://g-b.dk/Main/WebHome[/color]
and then the server would pick: [color=#00CC00]http://g-b.dk[color=#CC0000]/bin/view[/color]/Main/WebHome[/color]
but without diplaying the red bit.
So I'm looking for something that can rewrite the request-url to insert [color=#CC0000]/bin/view[/color] after the domain. It's not that simple though:
-- I might want to have some URLs like [color=#00CC00]http://g-b.dk/gallery[/color] without activating the rewrite.
-- If I'm requesting something that already has the [color=#CC0000]/bin/view[/color] part, then it shouldn't be inserted a second time.
-- There are other scripts besides [color=#CC0000]/bin/view[/color], like for example [color=#CC0000]/bin/attach[/color] and [color=#CC0000]/bin/edit[/color]. All scripts are in the [color=#CC0000]/bin/[/color] folder, though.
The folder name and filename always begin with an uppercase letter, if it's any help, while normal links like /gallery are lowercase. I've tried to read up on the magic world of RegEx and RewriteRules but I don't grasp it yet. If it's any help, then
Try out DreamHost with a free WebID /// Compare plans