URL redirection at freeshell.de

This blog is hosted by freeshell.de – Nic Nac Project server. Great! 🙂

Since the same page of this server can be reached by several URL, I decided to add a little trick for redirecting my blog visitor to the same address. This may be useful to help web spiders in indexing my pages.

For this reason if  You try to reach

http://www.freeshell.de/~jose
http://nic-nac-project.de/~jose
or any other equivalent URL, Your browser will be redirected to
http://www.nic-nac-project.de/~jose/

Since my blog is a WordPress one, a .htaccess file has been made by my software configuration. I set up the redirection by adding two lines to the .htaccess file created by WordPress in my public_html directory:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~jose/
RewriteCond %{HTTP_HOST}    !^www\.nic-nac-project\.de [NC]
RewriteRule ^(.*)$    http://www.nic-nac-project.de/~jose/$1 [L,R]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /~jose/index.php [L]
</IfModule>

Tags: ,

Leave a Reply