I'm using WAMP to serve a pet project on my localhost called "mvc." I'm trying to redirect requests made to mvc's root to a sub folder called /public. I have a .htaccess file in my root with the below code. It's not getting the job done.
Code:
RewriteEngine on
#!-d .htaccess ignores all requests made directly to directories sub folders
RewriteCond %{REQUEST_FILENAME} !-d
#!-f .htaccess ignores all requests made to specific files within directory
RewriteCond %{REQUEST_FILENAME} !-f
#favicon.ico is a default file some browsers request. don't let browser trigger 404 if we don't have this file
RewriteCond %{REQUEST_URI} !=/favicon\.ico
# technique?
RewriteBase /mvc/public
#send all alphanumeric requests to index.php as QSA, second match catches file extension
RewriteRule ^([-_A-z0-9\/]+)\.?([A-z]+)?$ /mvc/public/index.php?url=$1&extension=$2 [QSA,L]
# Really, from A (character 41) to a (character 7a)?
# Frankly, I've never seen anyone do it this way before
# (but it doesn't mean that it's wrong).
# If you're specifying upper and lower case letters, please replace A-z with A-Za-z in both instances.
# If the dot character is truly optional, then you have no file extension so there is also a logic problem.
I have mod_rewrite enabled and I'm not getting any errors.