RewriteEngine On #RewriteRule ^(.*)?\.html$ index.php?action=$1 [QSA,L] RewriteRule ^(.*)?\.htm$ bla.html [L](the first line is what i eventually want, the second is what i currently use for testing)
when i request x.htm, the server returns error 400 (bad request). i can't explain why. in any case it's somewhere in the server, i am sure the rewrite rule is ok. the file bla.html exists and is accesible trough the normal url.
it works when i replace bla.html with it's absolute path (/bure/MDD/src/bla.html), but i don't want that
note that this .htaccess file is in an alias. it works fine from the documentroot
apache logs:
access.log
127.0.0.1 - - [21/Jan/2008:21:05:57 +0100] "GET /buro/MDD/src/x.htm HTTP/1.1" 400 226 127.0.0.1 - - [21/Jan/2008:21:05:57 +0100] "GET /favicon.ico HTTP/1.1" 404 209 127.0.0.1 - - [21/Jan/2008:21:05:57 +0100] "GET /favicon.ico HTTP/1.1" 404 209 127.0.0.1 - - [21/Jan/2008:21:05:57 +0100] "GET /favicon.ico HTTP/1.1" 404 209
error.log
Starting the Apache2.2 service The Apache2.2 service is running. rmine the server's fully qualified domain name, using 10.8.0.2 for ServerName [Mon Jan 21 21:05:54 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.5 configured -- resuming normal operations [Mon Jan 21 21:05:54 2008] [notice] Server built: Jan 18 2008 00:37:19 [Mon Jan 21 21:05:54 2008] [notice] Parent: Created child process 5932 httpd.exe: Could not reliably determine the server's fully qualified domain name, using 10.8.0.2 for ServerName httpd.exe: Could not reliably determine the server's fully qualified domain name, using 10.8.0.2 for ServerName [Mon Jan 21 21:05:57 2008] [notice] Child 5932: Child process is running [Mon Jan 21 21:05:57 2008] [notice] Child 5932: Acquired the start mutex. [Mon Jan 21 21:05:57 2008] [notice] Child 5932: Starting 64 worker threads. [Mon Jan 21 21:05:57 2008] [notice] Child 5932: Starting thread to listen on port 80. [Mon Jan 21 21:05:57 2008] [error] [client 127.0.0.1] Invalid URI in request GET /buro/MDD/src/x.htm HTTP/1.1 [Mon Jan 21 21:05:57 2008] [error] [client 127.0.0.1] File does not exist: C:/software/apache/htdocs/favicon.ico [Mon Jan 21 21:05:57 2008] [error] [client 127.0.0.1] File does not exist: C:/software/apache/htdocs/favicon.ico [Mon Jan 21 21:05:57 2008] [error] [client 127.0.0.1] File does not exist: C:/software/apache/htdocs/favicon.ico
rewrite.log
127.0.0.1 - - [21/Jan/2008:21:05:57 +0100] [localhost/sid#6f5148][rid#f83300/initial] (3) [perdir D:/School/Buro 302/Workspace/MDD/src/] strip per-dir prefix: D:/School/Buro 302/Workspace/MDD/src/x.htm -> x.htm 127.0.0.1 - - [21/Jan/2008:21:05:57 +0100] [localhost/sid#6f5148][rid#f83300/initial] (3) [perdir D:/School/Buro 302/Workspace/MDD/src/] applying pattern '^(.*)?\.htm$' to uri 'x.htm' 127.0.0.1 - - [21/Jan/2008:21:05:57 +0100] [localhost/sid#6f5148][rid#f83300/initial] (2) [perdir D:/School/Buro 302/Workspace/MDD/src/] rewrite 'x.htm' -> 'bla.html' 127.0.0.1 - - [21/Jan/2008:21:05:57 +0100] [localhost/sid#6f5148][rid#f83300/initial] (3) [perdir D:/School/Buro 302/Workspace/MDD/src/] add per-dir prefix: bla.html -> D:/School/Buro 302/Workspace/MDD/src/bla.html 127.0.0.1 - - [21/Jan/2008:21:05:57 +0100] [localhost/sid#6f5148][rid#f83300/initial] (1) [perdir D:/School/Buro 302/Workspace/MDD/src/] internal redirect with D:/School/Buro 302/Workspace/MDD/src/bla.html [INTERNAL REDIRECT]
help