usability seo

SEO friendly redirection with. Htaccess – Part1

24. April 2008 – 05:26

You have a blog on your site, like WordPress, Drupal, LiveJournal, or content management systems, such as Joomla and Mambo in a subdirectory such as http://www.domain.com / xyz installed, and want, that it is not over the long path to subdirectory, but directly via the http root directory://www.domain.com be called?

Of course this will also be forwarding search engine friendly and search engine position (SERP) not affect.

One of the best methods to the site to forward the redirection method of 'mod_rewrite’ Module in Apache HTTPD Webserver. Most web hosts with Apache web server supports mod_rewrite redirects by default and can implement this trick without problems.

To send a subdirectory in the root directory, must obtain possible. existing ones. htaccess file in the subdirectory / Subdirectory and all requests are mapped to the new site (zB. the root) correctly point. If the. Htaccess file does not exist, it must be rebuilt:

<IfModule mod_rewrite.c> <IfModule mod_rewrite.c>
RewriteEngine On RewriteEngine On
RewriteBase / RewriteBase /
RewriteRule ^xyz/(.*)$ /$1 [R=301,NC,L] RewriteRule ^ xyz/(.*)$ / $ 1 [R = 301, NC, L]
</IfModule> </ IfModule>

Eeplace you xyz in the fourth row of the directory where your weblog, CMS, Z.A. are stored.

This line in the. Htaccess file redirects the / xyz sub-directory in the root directory called by. Stripping “xyz/” a .

For example, a visit to http://www.domain.com / xyz / index.html forwarded to http://www.domain.com/index.html, rather than a 404 Errors generate.

This is useful for visitors, who have come to your site via bookmarks or favorites, or have found your website through search engines, have your new website crawled and updated your URLs.

The above procedure is important, because only one with 300 or 301 appointed permanent redirect sicherzustellt, Google that you do not punishes and devalues the PageRank and the ranking of your site. Java or similar measures are not suitable for search engines.

Be Sociable, Share!

    These articles might well be:

    Artikel drucken Print
    1. 3 Responses to “SEO friendly redirection with. Htaccess – Part1”

    2. Hello,

      that is exactly the solution I'm looking after all the time. I have joomla in a subdirectory and I will like you've described already above the cut out joomla / in the Url. Unfortunately it does not work.

      get a 404! and joomla is still
      in the URL.

      htaccess in my joomla folder
      ##
      Options FollowSymLinks
      RewriteEngine On
      RewriteBase /

      RewriteRule ^ joomla /(.*)$ /$1 [R=301,NC,L]
      ##

      Can it be that you have in your posting all posted double-?

      For tips and help I would be very happy! Actually would be your approach to the right place!

      By Batman on Dec 22, 2009

    3. Edit configuration.php of Joomla
      var $live_site = ”;
      change in
      var $live_site = ‘http://www.meine-domain.de/ ';

      and default. htaccess use !

      This has caused me at the strip!

      By Batman on Dec 22, 2009

    4. Must be this relay for each side made ?

      By Alejandra on Mar 23, 2010

    Post a Comment