Click to See Complete Forum and Search --> : .htaccess Behaving Strangly


Hemmer
03-15-2007, 06:46 PM
If I put the following .htaccess on my server:

RewriteEngine on
RewriteBase /
RewriteRule ^(.*)/?$ $1.html

it returns the following when trying to visit http://www.websitepath.com/index :

Not found - 404

URL requested (/share/isp/plusnet/www/fa/falklandht/htdocs/stewardship//test/index.html) not found


but if I use this .htaccess configuration:

RewriteEngine on
RewriteBase /
RewriteRule ^([A-Za-z0-9+-]+)/?$ $1.html

it returns a 404, behaving as if it doesn't recognise the .htaccess file:


Not found - 404

URL requested (/test/index) not found

Clearly neither configuration works, so I would like to know what's wrong. Basically, I just want it to strip the .html of a URL so http://www.webpage.com/index points to http://www.webpage.com/index.html. Any help appreciated,

cheers Hemmer