Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

htaccess file extension

RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /.*index HTTP/
RewriteRule ^(.*)index$ http://example.com/$1 [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ http://example.com/$1 [L,R=301]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /(.+).php HTTP/
RewriteRule ^(.+).php$ http://example.com/$1 [L,R=301]
RewriteRule ^([a-z]+)$ /$1.php [L]
Source by help.dreamhost.com #
 
PREVIOUS NEXT
Tagged: #htaccess #file #extension
ADD COMMENT
Topic
Name
9+4 =