Hello,
This question is about an Apache configuration problem I have recently. I hope 
someone can help here!

In order to view the websites I develop locally easily I set up Apache mod 
rewrite to map a url to a directory on the local filesystem. This way I do not 
have to make a Virtual directory for every project but the URL is being 
rewritten to map to a directory on the local system. Here's the setup:

I set up an A record in the DNS of my domain to point back to the local machine 
wjenI use a special prefix in the URL:
*.local 127.0.0.1
(saying "every subdomain ending with .local is to be redirected to localhost)

I set up Apache's httpd.config Mod Rewrite like this:

LoadModule rewrite_module modules/mod_rewrite.so
(remove the comment - # - sign)

RewriteEngine on
RewriteCond %{HTTP_HOST} (.*)\.local.mydomain.com
RewriteRule (/.*)       D:/www/wwwroot/%1/$1
(saying: every request ending on local.mydomain.com has to be rerouted to the 
directory D:/www/wwwroot/<whatever preceded .local.mydomain.com>/<whatever 
followed.local.mydomain.com)>

This worked fine: if I had a directory "d:/www/shipyards/q.cfm all I had to 
enter in my address bar was "http://shipyards.local.mydomain.com/ q.cfm and 
q.cfm was served.

Until yesterday, the same url (http://shipyards.local.mydomain.com/q.cfm) only 
gives me this response 
---------------------------
Bad Request
Your browser sent a request that this server could not understand.
---------------------------
Apache_error log gives this:

[Sat Jun 14 13:29:10 2008] [error] [client 127.0.0.1] Invalid URI in request 
GET / HTTP/1.1
[Sat Jun 14 13:29:20 2008] [error] [client 127.0.0.1] Invalid URI in request 
GET /q.cfm HTTP/1.1

Apache access log gives this:
---------------------------
127.0.0.1 - - [14/Jun/2008:13:29:10 +0200] "GET / HTTP/1.1" 400 226
127.0.0.1 - - [14/Jun/2008:13:29:20 +0200] "GET /q.cfm HTTP/1.1" 400 226
---------------------------

I have no idea why the web browser doesn't recognize these requests anymore and 
there is nothing that comes to mind I might have changed that caused this 
behaviour. I tried setting up Virtual Hosts to circumevent the problemn but 
there Apache won't start for other errors in the config file. And actually I 
want the situations with Mod rewrite back as before.
Can anyone here help me out?

Thanks!

Windows XP SP2
WAMP Server:
Apache 2.2.8
FireFox 2.0.0.14 / IE 7.0.5730.13


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307482
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to