Skip to content

Instantly share code, notes, and snippets.

@thisislawatts
Created May 22, 2014 11:11
Show Gist options
  • Save thisislawatts/828309622fa217c168d3 to your computer and use it in GitHub Desktop.
Save thisislawatts/828309622fa217c168d3 to your computer and use it in GitHub Desktop.
DCD .htaccess
Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
Options +Indexes
RewriteEngine On
RewriteRule ^student/(.*)$ index1.php?page=student&subpage=$2 [L,QSA]
# If the requested file doesn't exist as directory or file
# pass to app(index1.php) to handle the routing
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index1.php?page=$1 [L,QSA]
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment