Skip to content

Instantly share code, notes, and snippets.

@elchappo
Created October 25, 2012 14:55
Show Gist options
  • Select an option

  • Save elchappo/3953057 to your computer and use it in GitHub Desktop.

Select an option

Save elchappo/3953057 to your computer and use it in GitHub Desktop.
htaccess php rewrite
Options +FollowSymLinks
RewriteEngine On
RewriteBase /subfolder/
RewriteCond %{REQUEST_URI} !^/subfolder
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]+)/$ $1.php
RewriteRule ^([a-z]+-?[a-z]+)/$ $1.php
RewriteRule ^([a-z]+)$ $1.php
RewriteRule ^([a-z]+-?[a-z]+)$ $1.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment