Apache Server
Leitet alle Anfragen der Art http://xdomainx.com/dir/index.html auf http://www.xdomainx.com/dir/ weiter und schafft damit eindeutige URLs.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.xdomainx\.com$
RewriteRule ^(.*)$ http://www.xdomainx.com/$1 [L,R=301]
RewriteCond %{THE_REQUEST} index\. [NC]
RewriteRule ^(.*)index\.(.*) /$1 [L,NC,R=301]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ http://%{HTTP_HOST}/ [R=301,L,NC]
Leitet alle Anfragen der Art http://www.xdomainx.com/dir/index.html auf http://xdomainx.com/dir/ weiter und schafft damit eindeutige URLs.
RewriteCond %{HTTP_HOST} !^xdomainx\.com$
RewriteRule ^(.*)$ http://xdomainx.com/$1 [L,R=301]
RewriteCond %{THE_REQUEST} index\. [NC]
RewriteRule ^(.*)index\.(.*) /$1 [L,NC,R=301]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ http://%{HTTP_HOST}/ [R=301,L,NC]
htm und html Dateien werden als php Dateien geparst.
AddType application/x-httpd-php .htm .html
Bestimmte User Agents werden auf eine Fehlerseite weitergleitet.
RewriteCond %{HTTP_USER_AGENT} SurveyBot [OR]
RewriteCond %{HTTP_USER_AGENT} grabber [NC,OR]
RewriteCond %{HTTP_USER_AGENT} zeus [NC]
RewriteRule .* http://www.mysite.de/blocked.html [F,L]
Sende ein Kommentar, Frage, Korrekturen, Beschimpfungen...
doxapp c++ Zur Übersicht home