“.htaccess” Réponses codées

.htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Perfect Penguin

.htaccess


# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress
Mr. Codex

.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]
Malario

.htaccess

RewriteEngine  on
RewriteRule ^(.*)$ $1.php
Xinov10

.htaccess

<IfModule mod_php5.c>
php_value max_execution_time 300
</IfModule>
Easy Eel

.htaccess

# GZIP Komprimierung aktivieren
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
Malario

.htaccess

#Supress php errors
php_flag display_errors Off
Malario

.htaccess

#Before: https://example.com/index.php?user=robert

RewriteEngine On
RewriteRule ^user/([^/]+)?$ index.php?user=$1 [L,QSA]
    
#After: https://example.com/user/robert?query=value

#You can also use other query too.

#Like: robert?query=value&query2=value2&query3=value3
Mr. Codex

Réponses similaires à “.htaccess”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code