Forum Moderators: phranque

Message Too Old, No Replies

RewriteCond

         

mumebuhi

9:10 am on Nov 20, 2007 (gmt 0)

10+ Year Member



Hi,

They say... the first time is always the hardest. It is so true!

I have a very simple RewriteCond that looks like this:
# the idea is so that user don't have to type in the .html extension
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*) $1.html [L]

Now, the problem the condition did not match although the file is actually on the server. I turned the logging level to 4 and saw the following:
x.x.x.x - - [20/Nov/2007:00:51:00 --0800] [myhost/sid#555560c8dd30][rid#555560f3c198/initial] (4) RewriteCond: input='/one/two/counting.html' pattern='-f' => not-matched

The fact is /one/two/counting.html is present on the server (i.e. I can even access the page from the web browser). Help, please?

Thank you.

Buhi

phranque

1:26 pm on Nov 20, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld [webmasterworld.com], buhi!

is that the fully qualified absolute path to the file or is that the path from the document root?

mumebuhi

6:43 pm on Nov 20, 2007 (gmt 0)

10+ Year Member



I am excited to be part of this forum.

My document root is /var/www/html/. The 'counting.html' file is in
/var/www/html/one/two/counting.html. So, I guess my answer is absolute path relative to the doc root.

Thank you.

Buhi