Skip to content

Instantly share code, notes, and snippets.

@flacodirt
flacodirt / readme.md
Last active December 17, 2015 14:49 — forked from RaVbaker/readme.md

Redirect All Requests To Index.php Using .htaccess

In one of my pet projects, I redirect all requests to index.php, which then decides what to do with it:

Simple Example

This snippet in your .htaccess will ensure that all requests for files and folders that does not exists will be redirected to index.php:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d

@flacodirt
flacodirt / mysql_comment.markdown
Last active December 15, 2015 11:08 — forked from MadaraUchiha/mysql_comment.markdown
A little lighter, friendlier and more to the point.