jdMorgan

msg:1505023 | 2:48 pm on Dec 20, 2005 (gmt 0) |
We'll need a lot more detail about your URLs to be of any help. When you say "http://mydomain/test" do you mean that there is no ".com" or ".co.uk" on that domain? What *is* your index page's correct URL? Have you searched this forum for "trailing slash" and looked at the posted examples? JIm
|
Snookered

msg:1505024 | 2:43 am on Dec 21, 2005 (gmt 0) |
Sorry that was typo it should be [mydomain.com...] Every directory I have has an index page which isn't found without the trailing slash. I searched around and found out about mod_dir, which explains my problem. I tried putting DirectoryIndex index.html in the .htaccess but it made no difference. If you have any possible solution please let me know. Thanks
|
jdMorgan

msg:1505025 | 3:07 am on Dec 21, 2005 (gmt 0) |
I don't understand why mod_dir isn't taking care of this for you... Is it not loaded on your server? There's another solution using mod_rewrite, but you shouldn't use it unless you absolutely can't get mod_dir enabled properly. It's not very efficient compared to mod_dir, but this should work:
Options +FollowSymLinks RewriteEngine on # If REQUEST_URI does NOT(contain a period or end with a slash) RewriteCond %{REQUEST_URI} !(\.¦/$) # and it exists as a directory when translated to a server filepath with a slash appended RewriteCond %{REQUEST_FILENAME}/ -d # then redirect requested URI after adding a trailing slash RewriteRule (.*) http://www.example.com/$1/ [R=301,L]
Replace the broken pipe "¦" character above with a solid pipe before use; posting on this board modifies the pipe character. Jim
|
Snookered

msg:1505026 | 7:09 pm on Dec 21, 2005 (gmt 0) |
Hi I've asked technical support if mod_dir is loaded on the server but the they just sent back a list of files that the server understands and advising me to change the links. (It's a budget host and I think they outsource support) I'll try your solution and give it some testing.. Thanks
|
|