Environment: Apache 2 shipped with Mac OS X Leopard; with no big changes in the default httpd.conf.
I am setting up some rewrites through my .htaccess but I am not able to use target paths relative to the current directory.
# URL: http://localhost/~davis/rewrite/.htaccess
# File: /Users/davis/Sites/rewrite/.htaccess
RewriteRule go.php target.php
# Not working
I am expecting the rule to redirect users to http://localhost/~davis/rewrite/target.php
. It's resolving to the correct physical path but gives me a 404 saying that the path /Users/davis/Sites/rewrite/target.php
does not exist.
It works all good if I give the full URL.
# URL: http://localhost/~davis/rewrite/.htaccess
# File: /Users/davis/Sites/rewrite/.htaccess
RewriteRule go.php /~davis/rewrite/target.php
# Works
Am I missing something here? Anything to be setup in httpd.conf?
Thanks!
Edit: The relative URLs are working properly on my live Linux server. It's in my local Mac box that I am having problems.