ratanparai/Hostel-Management/master/api/.htaccess - Htaccess File

ratanparai/Hostel-Management/master/api/.htaccess

# Necessary to prevent problems when using a controller named "index" and having a root index.php
# more here: http://stackoverflow.com/q/20918746/1114320
Options -MultiViews

# turn rewriting on
RewriteEngine on

# the base folder where the project is hosted. for this case its in hostel directory 
# in the htdocs folder. change it if you change the project folder
RewriteBase /hostel/

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

#'-l' (is symbolic link)
# Treats the TestString as a pathname and tests whether or not it exists, 
# and is a symbolic link. May also use the bash convention of -L or -h if 
# there's a possibility of confusion such as when using the -lt or -le tests.
#
RewriteCond %{REQUEST_FILENAME} !-l

# then rewrite the url!
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

# Easy tutorial @see https://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/

On Github License

Files

Download PDF of Htaccess file
REQUEST_FILENAME

Comments

Apache