Learning MVC .. need to understand htaccess.
Posted: Thu Nov 20, 2014 3:55 am
Hey guys i have a questiion about the htaccess file and it is specific to a little demo project that i am doing ,
have a look below , i have the following directory structure :
App
- htaccess file
- controllers
- home
- core
- app
- controller
- modals
- Users
- views
- index.php
- home
- init.php
Public
- CSS
- index.php
- htaccess file
now inside the htaccess file in public , i have the following commands :
can somebody thoroughly explain to me what the above commands are doing ? ld please don't re direct me to another URL , i would prefer a human explanation .
i appreciate your time and patience .
gautam.
have a look below , i have the following directory structure :
App
- htaccess file
- controllers
- home
- core
- app
- controller
- modals
- Users
- views
- index.php
- home
- init.php
Public
- CSS
- index.php
- htaccess file
now inside the htaccess file in public , i have the following commands :
Code: Select all
Options -MultiViews
ReWriteEngine On
RewriteBase /mvc_model/public
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
can somebody thoroughly explain to me what the above commands are doing ? ld please don't re direct me to another URL , i would prefer a human explanation .
i appreciate your time and patience .
gautam.