so
This commit is contained in:
@@ -1,20 +1,33 @@
|
|||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
|
||||||
|
# -------------------------------------
|
||||||
|
# 1) Domains vom Typ *.ismyusbfake.com
|
||||||
|
# immer nach /fakecheck/ umleiten
|
||||||
|
# (SEO-freundlich: 301)
|
||||||
|
# -------------------------------------
|
||||||
|
RewriteCond %{HTTP_HOST} (^|\.)ismyusbfake\.com$ [NC]
|
||||||
|
# Keine Schleife, wenn schon /fakecheck... im Pfad
|
||||||
|
RewriteCond %{REQUEST_URI} !^/fakecheck(/|$) [NC]
|
||||||
|
RewriteRule ^.*$ /fakecheck/ [L,R=301]
|
||||||
|
|
||||||
|
# -------------------------------------
|
||||||
|
# 2) Ab hier DEINE bisherigen Regeln
|
||||||
|
# für echte Dateien/Ordner & PHP-Routing
|
||||||
|
# -------------------------------------
|
||||||
|
|
||||||
# 0) Echte Dateien und Ordner direkt ausliefern
|
# 0) Echte Dateien und Ordner direkt ausliefern
|
||||||
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
||||||
RewriteCond %{REQUEST_FILENAME} -d
|
RewriteCond %{REQUEST_FILENAME} -d
|
||||||
RewriteRule ^ - [L]
|
RewriteRule ^ - [L]
|
||||||
|
|
||||||
# 1) /foo/bar -> foo/bar.php
|
# 1) /foo/bar -> /foo/bar.php (wenn die Datei existiert)
|
||||||
# Nur wenn REQUEST_FILENAME KEIN Verzeichnis ist (!!)
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{REQUEST_FILENAME}.php -f
|
RewriteCond %{REQUEST_FILENAME}.php -f
|
||||||
RewriteRule ^(.+?)/?$ $1.php [L]
|
RewriteRule ^(.+?)/?$ $1.php [L]
|
||||||
|
|
||||||
# 2) /foo/bar -> foo/bar/index.php
|
# 2) /foo/bar -> /foo/bar/index.php (wenn diese Datei existiert)
|
||||||
# Wieder nur wenn KEIN Verzeichnis (!!)
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{REQUEST_FILENAME}/index.php -f
|
RewriteCond %{REQUEST_FILENAME}/index.php -f
|
||||||
RewriteRule ^(.+?)/?$ $1/index.php [L]
|
RewriteRule ^(.+?)/?$ $1/index.php [L]
|
||||||
|
|
||||||
# 3) Wenn nichts passt -> nichts rewrite’n → Apache liefert normalen 404
|
# 3) Kein Rewrite -> Apache liefert normalen 404, falls nix existiert
|
||||||
|
|||||||
Reference in New Issue
Block a user