Apache Webserver

From wiki.linuxonlinehelp.eu
Revision as of 14:38, 22 May 2017 by Author (talk | contribs)
Jump to navigation Jump to search

Redirects for Browser with .htaccess

Redirect Browser by Language to other Websites Create a .htaccess at the Webspace and enter:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP:Accept-Language} ^de [NC]
RewriteRule ^$ /linux-support-deutsch [L,R=301]
RewriteRule ^$ /linux-support-english [L,R=301]
</IfModule>

This will redir German and International Users to two different Sites.

Block Access to Subfolders wp-includes of Wordpress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^wp-admin/includes/ - [F,L]
RewriteRule !^wp-includes/ - [S=3]
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
RewriteRule ^wp-includes/theme-compat/ - [F,L]
</IfModule>