I'm trying to get Apache mod rewrite to work on my local machine. I'm running OSX with PHP 5 and the Apache mod rewrite module is enabled.
I have a directory called localhost/~Jason/hfh/admin with various PHP includes called based on a $_GET variable. I want to let users type (in theory)
localhost/~Jason/hfh/admin/pages
and have that URL stay in the address bar, while what gets displayed is
localhost/~Jason/hfh/admin/?admin=pages
So.
I've created a .htaccess file that sits in the /hfh directory. Inside, I've put this mod rewrite text:
RewriteEngine On
RewriteRule ^admin/([^/.]+)/?$ admin/?admin=$1 [L]
When I go to the browser and type
localhost/~Jason/hfh/admin/pages
I get a "Problem loading page" error, and Firefox says, "Oops. Firefox can't load this page for some reason."
Can anyone help me figure this out? I have such a hard time with regex and mod rewrite...