[thelist] Steps towards permanent URL's

John C Bullas jcbullas at nildram.co.uk
Mon Sep 29 11:54:58 CDT 2003


At 17:01 29/09/2003, Keith Underdown wrote
>Hi There
>
>I am try to move to permanent URLS but the Apache learning curve is pretty 
>big and many of the articles written don't mean much to me.
>
>So far I have added a .htaccess file to my root directory containing:
>
>DirectoryIndex index
>
>As I understand it this telling Apache that if somebody tries to access a 
>file called index with no extension then it looks for instances ov 
>index.*, picks the best one and tells the browser to treat it in the way 
>implied by the extension. In my case I have index.php. When I tried this 
>locally it worked fine and invoked index.php. So I could hide the technology.
>
>I uploaded the .htaccess file to my site and it is not having the same 
>effect, www.qconsultancy.co.uk gives me a directory listing for the site 
>(highly undesirable), www.qconsultancy.co.uk/index gives me a 404 not 
>found error, only www.qconsultancy.co.uk/index.php works.

ok #1 turn indexing off if the ISP allows it by default

Options No Indexes

(i think)

but if stick an index.html file  in the directory it will block listings ;)

#2 add

DirectoryIndex index.php

so someone going wwwyourdomain.com/ will get the php page

Then

RedirectMatch Permanent /index\.([shtml|html|htm])$ 
http://www.yourdomain.com/index.php

to route all index calls to the php page

think this will work ;)

it will tell crawlers to update their databases too!!!!

FB


>So that's one problem, what's different about the way my ISP has Apache 
>set up by default?
>
>This is but the first step on a long quest so I'd be grateful for your help!



More information about the thelist mailing list