Hi,
funktioniert die htaccess so?
- Umleitung www zu ohne www
- normale Umleitung
- Zugriff auf WP-Login
- Beschränkung auf zwei IP-Adressen
- und komplette Sperre der Homepage für eine IP
PHP
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^press-photographer\.de$ [NC]
RewriteRule ^(.*)$ http://press-photographer.de/$1 [L,R=301]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# Auth protect wp-login.php
<Files wp-login.php>
AuthName "Restricted Admin-Area"
AuthType Basic
AuthUserFile /home/www/web240/html/.htpasswd
Require valid-user
</Files>
# Zugriff über feste IP
AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName "Access Control"
AuthType Basic
Order deny,allow
Deny from all
# Whitelist IP Adresse
Allow from 255.08.15.1
Allow from 255.08.15.2
# Deny access to important files
<FilesMatch "(\.htaccess|\.htpasswd)">
Order deny,allow
Deny from all
</FilesMatch>
# IP-Sperre
order allow,deny
deny from 62.146.217.250
allow from all
Alles anzeigen