
Originally Posted by
johnmcjack
Apache is typically set up to do this automatically. I've -never- seen a web host that doesn't display the index page when given a URL without a file specified. You shouldn't need to do anything.

Originally Posted by
johnmcjack
take a look at your code:
Code:
#this command is misspelled
# should be RewriteEngine
# the setting is misspelled also
# should be On
rewriteengine on
#this command is misspelled
# should be RewriteCond
rewritecond %{HTTP_HOST} ^www.vecstore.com$ [OR]
#this command is misspelled
# should be RewriteCond
rewritecond %{HTTP_HOST} ^vecstore.com$
#this command is misspelled
# should be RewriteRule
rewriterule ^vecstore\.com$ "http\:\/\/vecstore\.com\/vecstore\.com\/Index\.html" [R=301,L]
# This rewrite doesn't make any sense.
# If someone visits vecstore.com (NO www, NO path),
# they'll be redirected to http://vecstore.com/vecstore.com/Index.html
# Is that what you want?
# one of the two above conditions will almost always be true,
# and it's not really testing what you want to test: it's testing if the Host name matches.
# Unless you're running more than one website out of the same root directory,
# the Host name will always be some variation of your domain name.
# IIUYC, you should be looking for a missing filename.
# Maybe something like this:
RewriteEngine On
RewriteCond %{REQUEST_URI} !-f # if requested url is *not* a real file
RewriteCond %{REQUEST_URI} -d # but *is* a directory
RewriteRule ^.*$ http://vecstore.com$1/index.html [R=301,L] # redirect to index file for that directory
# this is untested, so you may need to fiddle with parts of it.
# I'll try it out for you when I get home.
# If I've misunderstood what you're trying to do, please explain.
Bookmarks