without www
Permalink
Hello,
I just re-installed concrete5 (5.6) on my server under the www-map.
Now I want to open de website without the www in front of the webadres.
How can I do that.
Thanks for helping.
I just re-installed concrete5 (5.6) on my server under the www-map.
Now I want to open de website without the www in front of the webadres.
How can I do that.
Thanks for helping.
Hi jackbasting
You could achieve this by modifying something on your webserver.
In your root directory you should find a .htaccess file. Perhaps it's hidden becaus it begins wit a dot - then make it visible with your ftp-tool.
Before you change your .htaccess make a copy of it (backup). If something is going wrong you can rename your backup and undo the changes you made.
You can add the following code:
Also see this tutorial, perhaps some steps will help you. Its another solution with a less generic way - but also works:
http://www.inmotionhosting.com/support/website/htaccess/force-www-h...
best regards, webpresso
You could achieve this by modifying something on your webserver.
In your root directory you should find a .htaccess file. Perhaps it's hidden becaus it begins wit a dot - then make it visible with your ftp-tool.
Before you change your .htaccess make a copy of it (backup). If something is going wrong you can rename your backup and undo the changes you made.
You can add the following code:
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Also see this tutorial, perhaps some steps will help you. Its another solution with a less generic way - but also works:
http://www.inmotionhosting.com/support/website/htaccess/force-www-h...
best regards, webpresso
Hi jackbasting
You could achieve this by modifying something on your webserver.
In your root directory you should find a .htaccess file. Perhaps it's hidden becaus it begins wit a dot - then make it visible with your ftp-tool.
Before you change your .htaccess make a copy of it (backup). If something is going wrong you can rename your backup and undo the changes you made.
You can add the following code:
Also see this tutorial, perhaps some steps will help you. Its another solution with a less generic way - but also works:
http://www.inmotionhosting.com/support/website/htaccess/force-www-h...
best regards, webpresso
You could achieve this by modifying something on your webserver.
In your root directory you should find a .htaccess file. Perhaps it's hidden becaus it begins wit a dot - then make it visible with your ftp-tool.
Before you change your .htaccess make a copy of it (backup). If something is going wrong you can rename your backup and undo the changes you made.
You can add the following code:
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Also see this tutorial, perhaps some steps will help you. Its another solution with a less generic way - but also works:
http://www.inmotionhosting.com/support/website/htaccess/force-www-h...
best regards, webpresso
Hmmm...Just copy and paste. Must be not so difficult.
It doesn't work yet.
I made an .htaccess file
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.vegnieuwvliet.nl$ [NC]
RewriteRule ^(.*)$http://www.vegnieuwvliet.nl/$1 [L,R=301]
I put it in the folder /domains/vegnieuwvliet.nl/htdocs/www on the webserver.
What am I doing wrong?
I made an .htaccess file
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.vegnieuwvliet.nl$ [NC]
RewriteRule ^(.*)$http://www.vegnieuwvliet.nl/$1 [L,R=301]
I put it in the folder /domains/vegnieuwvliet.nl/htdocs/www on the webserver.
What am I doing wrong?
Did you tried what user webpresso suggested with the example code?
You could use this one for your site. Should work.
Other idea:
Use the cannonical functions which are built in concrete5.
http://documentation.concrete5.org/editors/dashboard/system-and-mai...
You could use this one for your site. Should work.
RewriteEngine On RewriteCond %{HTTP_HOST} ^vegnieuwvliet.nl [NC] RewriteRule ^(.*)$ http://vegnieuwvliet.nl/$1 [L,R=301]
Other idea:
Use the cannonical functions which are built in concrete5.
http://documentation.concrete5.org/editors/dashboard/system-and-mai...
Google on it, there are plenty examples.