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.
I have mod_rewrite enabled and I'm not getting any errors.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 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]



Reply With Quote



Bookmarks