htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: DirectoryIndex can point to external page also
PostPosted: 27 Sep 2006 07:15 
Offline
User avatar

Joined: 25 Sep 2006 04:48
Posts: 242
Normally DirectoryIndex is used like
Code:
DirectoryIndex index.html index.php


This is especially useful when using
Code:
Options -Indexes


Well this can also be used like this
Code:
DirectoryIndex https://secure.example.com/login.php


This redirects all requests for https://secure.example.com/ or https://secure.example.com to https://secure.example.com/login.php

Cool huh? But you should actually just do

Code:
DirectoryIndex login.php


The first example only comes in handy when you want to force http://www.example.com requests to a different domain like https://secure.example.com. Like if they both point to the same folder but are served on :443 and :80


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB