#RewriteEngine On #RewriteBase / #RewriteCond %{REQUEST_FILENAME} !-d #RewriteCond %{THE_REQUEST} ^GET\ /[^?\s]+\.php #RewriteRule (.*)\.php$ /$1/ [L,R=301] #RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule (.*)/$ $1.php [L] #RewriteCond %{REQUEST_FILENAME}.php -f #RewriteRule .*[^/]$ $0/ [L,R=301] #RewriteCond %{REQUEST_FILENAME} !-d #RewriteCond %{REQUEST_FILENAME}\.php -f #RewriteRule ^(.*)$ $1.php #RewriteRule ^([^/]+)/$ $1.php # Forces a trailing slash to be added #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ #RewriteRule (.*)$ /$1/ [R=301,L] php_value upload_max_filesize 20M php_value post_max_size 20M php_value max_execution_time 200 php_value max_input_time 2000