[thelist] Apachache mod_rewrite
Hershel Robinson
hershelr at netvision.net.il
Wed Sep 14 11:09:52 CDT 2005
My first time trying to use mod_rewrite. Please bear with me. :)
I'm using Apache 2.0.54 on Win 2K Pro, my testing machine. Once I get
this to work I hope to upload it to our live server which is:
Apache Version 1.3.33 (Unix) on a Linux box.
In the global httpd.conf on my machine I have:
LoadModule rewrite_module modules/mod_rewrite.so
RewriteEngine On
RewriteLogLevel 9
NameVirtualHost *:80
<VirtualHost *:80>
ServerName devmishpacha.local
DocumentRoot "E:\ApacheRoot\devmishpacha.local"
</VirtualHost>
and I defined devmishpacha.local in my hosts file.
The URL:
http://devmishpacha.local/features.php?mag=1
works exactly as expected.
I want:
http://devmishpacha.local/features/1
to be mapped to the above URL. I tried putting this in the .htaccess
file in "E:\ApacheRoot\devmishpacha.local":
RewriteRule /features/([0-9]+) /features.php?mag=$1
RewriteRule ^/features/([0-9]+) /features.php?mag=$1
RewriteRule ^features/([0-9]+) /features.php?mag=$1
I tried all three and all three show the same error in the log:
File does not exist: E:/ApacheRoot/devmishpacha.local/features
Anyone know what I'm doing wrong?
Thanks,
Hershel
More information about the thelist
mailing list