Removing www. domain

Discussion in 'Installation/Configuration' started by rockan, Apr 26, 2011.

  1. rockan

    rockan New Member

    I want to use my website without www, but the redirect doesnt work on old links.

    If for example, google visits, it gets directed to with double slashes and gets 404 not found.

    My apache directives looks like this...

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^$ [NC]
    RewriteRule ^(.*)$$1 [R=301,L]
    RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ (trying to remove doubleslash, doesnt work)
    RewriteRule ^/(.*)$$1 [R=301,L] (also trying to remove doubleslash, doesnt work.)

    How do I fix the double slash problem in the redirect? becomes 404 not found
    Last edited: Apr 26, 2011
  2. falko

    falko Super Moderator ISPConfig Developer

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

Share This Page