[thelist] .htaccess

Keith cache at dowebs.com
Tue Dec 4 22:14:08 CST 2001


> Can anyone help me learn how to use .htaccess to do the following:

>  When a user requests http://www.domain.com/dir, they get: index.shtml
> from that directory.
> AND..
> When a user requests  http://www.domain.com/dir/index.html , they also
> get: index.shtml from that directory.

Easy to do John

In the format "Redirect old_URI new_URL" put the following in your 
.htaccess

Redirect /dir/index.html http://www.domain.com/dir/index.shtml

This works on Apache only if httpd.conf has AllowOverride set to All 
or includes FileInfo as an option that htaccess can override. It's 
important to note, the URI must not be the server's absolute path or 
a relative path, it needs to be the path from the domain's document 
root and must begin with a /

Did you do the same thing I did, change to using shtml on a site 
after people had bookmarked index.html? 

keith




More information about the thelist mailing list