Answers for "htaccess html"

PHP
4

rewrite .php to no extension

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
Posted by: Guest on September-09-2020
3

.htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Posted by: Guest on November-02-2020
0

.htaccess

# No extern use from your images
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domainname.de [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ https://domainname.de/hotlink.jpg [NC,R,L]
Posted by: Guest on June-28-2020
0

.htaccess

# Browser Caching
ExpiresActive On
ExpiresByType image/jpg "access 1 month"
ExpiresByType image/jpeg "access 1 month"
ExpiresByType image/gif "access 1 month"
ExpiresByType image/png "access 1 month"
ExpiresByType image/x-icon "access 1 month"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresDefault "access 3 days"
Posted by: Guest on June-28-2020

Browse Popular Code Answers by Language