Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th January 2012, 00:27
aristotlejones aristotlejones is offline
Junior Member
 
Join Date: Jan 2012
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Default help! I'm in ISPconfig3 .htaccess hell

I simply want to put an .htaccess file in my web directory for a site on an ISPConfig3 server that will redirect from www.domainname.com to just domainname.com

I've tried adding this to the .htaccess file

//Rewrite to www
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.zapboombang.com[nc]
RewriteRule ^(.*)$ http://zapboombang.com/$1 [r=301,nc]

and other variations found online, however non are working. Does anyone know if .htaccess files are being blocked higher up in a config somewhere or what I'm doing wrong?

Thanks
Reply With Quote
Sponsored Links
  #2  
Old 14th January 2012, 00:35
aristotlejones aristotlejones is offline
Junior Member
 
Join Date: Jan 2012
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
 
Default Solved it

Ok, solved it

the key is to enable the www subdomain in the ISPconfig3 sites domain settings, then put in the redirect as follows:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} www.domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
amavis rejects all inbound emails aclhkaclhk Installation/Configuration 5 28th February 2010 04:24
.htaccess ispconfig2 -> ispconfig3 SamTzu HOWTO-Related Questions 0 7th May 2009 14:45
CRON and .htaccess problems devilslayer General 1 23rd November 2007 16:49
.htaccess Liac Server Operation 15 20th June 2007 15:19
wordpress MU and ISPconfig .htaccess isues palkat General 4 18th October 2006 11:57


All times are GMT +2. The time now is 09:21.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.