Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th October 2010, 11:52
swordsaint swordsaint is offline
Member
 
Join Date: Oct 2006
Posts: 36
Thanks: 9
Thanked 0 Times in 0 Posts
Exclamation domain.com to www.domain.com

How do i redirect domain.com to www.domain.com i tired to edit my .htaccess file but it wont work. I have mod_rewrite on i use it for sef urls in joomla.

Quote:
################################################## ###
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
#
################################################## ###

## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
# mod_rewrite in use

RewriteEngine On

#To direct all dial4tech.com to www.dial4tech.com
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^dial4tech\.com$ [NC]
RewriteRule ^(.*)$ http://www.dial4tech.com/$1 [L,R=301]
</IfModule>
I also set Auto Subdomain to www and it still wont work
Reply With Quote
Sponsored Links
  #2  
Old 20th October 2010, 11:54
damir damir is offline
Senior Member
 
Join Date: Jun 2006
Posts: 375
Thanks: 11
Thanked 51 Times in 42 Posts
Default

Setup a A record in DNS with something like this and enable Auto Subdomain:

domain.com in A www in A ip.dd.re.ss
www in A ip.dd.re.ss

I have it like that and it works without htacess.
Reply With Quote
  #3  
Old 20th October 2010, 12:01
swordsaint swordsaint is offline
Member
 
Join Date: Oct 2006
Posts: 36
Thanks: 9
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by damir View Post
Setup a A record in DNS with something like this and enable Auto Subdomain:

domain.com in A www in A ip.dd.re.ss
www in A ip.dd.re.ss

I have it like that and it works without htacess.
I have domain.com in A and www. in A

whats is ip.dd.re.ss?
Reply With Quote
  #4  
Old 20th October 2010, 14:04
damir damir is offline
Senior Member
 
Join Date: Jun 2006
Posts: 375
Thanks: 11
Thanked 51 Times in 42 Posts
Default

that's ipadress.
Reply With Quote
  #5  
Old 20th October 2010, 22:27
swordsaint swordsaint is offline
Member
 
Join Date: Oct 2006
Posts: 36
Thanks: 9
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by damir View Post
that's ipadress.
i have www ipadress a and domain.com ipadress a records

A dial4tech.com 67.40.184.249
A www 67.40.184.249
Reply With Quote
  #6  
Old 21st October 2010, 15:59
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

There's no A record for dial4tech.com:

Code:
mh1:~# dig dial4tech.com

; <<>> DiG 9.3.4 <<>> dial4tech.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45248
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;dial4tech.com.                 IN      A

;; AUTHORITY SECTION:
dial4tech.com.          86400   IN      SOA     ns1.dial4tech.com. john.dial4tech.com. 2010101901 28800 7200 604800 86400

;; Query time: 252 msec
;; SERVER: 213.133.98.98#53(213.133.98.98)
;; WHEN: Thu Oct 21 15:16:24 2010
;; MSG SIZE  rcvd: 76

mh1:~#
I think you forgot the dot in your DNS record:

Code:
A dial4tech.com. 67.40.184.249
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
swordsaint (21st October 2010)
  #7  
Old 21st October 2010, 21:44
swordsaint swordsaint is offline
Member
 
Join Date: Oct 2006
Posts: 36
Thanks: 9
Thanked 0 Times in 0 Posts
Default

[QUOTE=falko;242435]There's no A record for dial4tech.com:

Code:
mh1:~# dig dial4tech.com

; <<>> DiG 9.3.4 <<>> dial4tech.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45248
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;dial4tech.com.                 IN      A

;; AUTHORITY SECTION:
dial4tech.com.          86400   IN      SOA     ns1.dial4tech.com. john.dial4tech.com. 2010101901 28800 7200 604800 86400

;; Query time: 252 msec
;; SERVER: 213.133.98.98#53(213.133.98.98)
;; WHEN: Thu Oct 21 15:16:24 2010
;; MSG SIZE  rcvd: 76

mh1:~#
I think you forgot the dot in your DNS record:

Code:
A dial4tech.com. 67.40.184.249
[/Q

Its supposed to be dial4tech.com.?
Reply With Quote
  #8  
Old 21st October 2010, 23:06
Toucan Toucan is offline
Senior Member
 
Join Date: Dec 2009
Posts: 479
Thanks: 78
Thanked 40 Times in 34 Posts
Default

Yes, the "." as the suffix of the domain indicates that 'that' is the fully qualified domain name
Reply With Quote
The Following User Says Thank You to Toucan For This Useful Post:
swordsaint (21st October 2010)
  #9  
Old 22nd October 2010, 02:20
swordsaint swordsaint is offline
Member
 
Join Date: Oct 2006
Posts: 36
Thanks: 9
Thanked 0 Times in 0 Posts
 
Default

Thanks it works
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
domain.com and www.domain.com point to different folder - DNS configured umano Installation/Configuration 4 6th March 2010 15:10
(Solution!) Redirect domain.com and co-domains to www.domain.com lubos Tips/Tricks/Mods 0 8th June 2009 03:28
Codomains - have domain.com redirect to www.domain.com? mxc General 4 2nd May 2009 12:17
domain.com & www.domain.com themoose General 4 28th November 2007 00:01
www.domain.com and domain.com patfee Tips/Tricks/Mods 3 12th November 2007 09:33


All times are GMT +2. The time now is 16:53.


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