•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Linux Servers and Apache section within the Tech Talk category of DaniWeb, a massive community of 429,791 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,817 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Linux Servers and Apache advertiser: Programming Forums
Views: 7422 | Replies: 12
![]() |
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,972
Reputation:
Rep Power: 32
Solved Threads: 117
How can I have all URLs under http://daniweb.com redirect to http://www.daniweb.com for SEO purposes?
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
•
•
Join Date: Aug 2003
Location: Jersey - You gotta problem wit dat?
Posts: 334
Reputation:
Rep Power: 8
Solved Threads: 5
You could either use a redirector script (not the best way to do it) or you could make sure your httpd.conf has www.daniweb.com as the ServerName instead of just daniweb.com (if you have control over your server.) My guess is that your httpd.conf has just daniweb.com, but since I don't know too much about your configuration, I'm just guessing there :)
If you spend more on coffee than on IT security, you will be hacked.
What's more, you deserve to be hacked.
-- former White House cybersecurity czar Richard Clarke
What's more, you deserve to be hacked.
-- former White House cybersecurity czar Richard Clarke
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,972
Reputation:
Rep Power: 32
Solved Threads: 117
My httpd.conf file does, indeed, have www.daniweb.com as a VirtualHost
I tried adding daniweb.com as well, and that just completely failed - every access to the page was running in circle doing infinite redirects between the two VirtualHosts.
I am pretty sure what I want can be done with .htaccess though. Could someone give me a heads up about that?
I tried adding daniweb.com as well, and that just completely failed - every access to the page was running in circle doing infinite redirects between the two VirtualHosts.
I am pretty sure what I want can be done with .htaccess though. Could someone give me a heads up about that?
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
•
•
Join Date: Feb 2003
Location: London, England
Posts: 281
Reputation:
Rep Power: 7
Solved Threads: 6
And I thought you were the pc gal. You disappoint me Dani...
•
•
Join Date: Aug 2003
Location: Jersey - You gotta problem wit dat?
Posts: 334
Reputation:
Rep Power: 8
Solved Threads: 5
Personally, I don't use .htaccess if I can do it in httpd.conf. Even the folks over at Apache suggest that. But I digress...
I just did a "dig" on both domains, and found some differences in the results (which should be the same, since they're both on the same box, same server, etc.)
Here's the stdout of daniweb.com:
Here it is for www.daniweb.com:
It doesn't matter how many times I redo it, I always get the same results for both. The DNS servers for www.daniweb.com are different than for daniweb.com, along with the settings for expiry, etc. I don't know that that's the answer you're looking for, but it's a start, at least. I'll do some further checking later today after I get back from a service call and let you know if I can *dig* up any more info :)
I just did a "dig" on both domains, and found some differences in the results (which should be the same, since they're both on the same box, same server, etc.)
Here's the stdout of daniweb.com:
kevin@Cerberus$ dig http://daniweb.com
; <<>> DiG 8.3 <<>> http://daniweb.com
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 2
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUERY SECTION:
;; http://daniweb.com, type = A, class = IN
;; AUTHORITY SECTION:
com. 1h26m24s IN SOA a.gtld-servers.net. nstld.verisign-grs.com. (
1080019309 ; serial
30M ; refresh
15M ; retry
1W ; expiry
15M ) ; minimum
;; Total query time: 18 msec
;; FROM: Cerberus.geekis-kahn.net to SERVER: default -- 167.206.3.166
;; WHEN: Tue Mar 23 13:18:19 2004
;; MSG SIZE sent: 36 rcvd: 109
Here it is for www.daniweb.com:
kevin@Cerberus$ dig http://www.daniweb.com
; <<>> DiG 8.3 <<>> http://www.daniweb.com
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 2
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUERY SECTION:
;; http://www.daniweb.com, type = A, class = IN
;; AUTHORITY SECTION:
daniweb.com. 1h25m33s IN SOA ns.propagation.net. hostmaster.propagation.net. (
2003103121 ; serial
1D ; refresh
2H ; retry
5w6d16h ; expiry
8H ) ; minimum
;; Total query time: 19 msec
;; FROM: Cerberus.geekis-kahn.net to SERVER: default -- 167.206.3.166
;; WHEN: Tue Mar 23 13:19:42 2004
;; MSG SIZE sent: 40 rcvd: 105
It doesn't matter how many times I redo it, I always get the same results for both. The DNS servers for www.daniweb.com are different than for daniweb.com, along with the settings for expiry, etc. I don't know that that's the answer you're looking for, but it's a start, at least. I'll do some further checking later today after I get back from a service call and let you know if I can *dig* up any more info :)
If you spend more on coffee than on IT security, you will be hacked.
What's more, you deserve to be hacked.
-- former White House cybersecurity czar Richard Clarke
What's more, you deserve to be hacked.
-- former White House cybersecurity czar Richard Clarke
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,972
Reputation:
Rep Power: 32
Solved Threads: 117
My httpd.conf file ony has an entry for www.daniweb.com ... :/ Is this "dig" a result of Network Solutions / Verisign as my registrar, or my host? I'm on a dedicated server. But I'm confused now
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
•
•
Join Date: Aug 2003
Location: Jersey - You gotta problem wit dat?
Posts: 334
Reputation:
Rep Power: 8
Solved Threads: 5
Basically, dig is a DNS lookup utility. I just tried it again with the T_ANY switch, and here's the stdout:
This is for www.daniweb.com:
The DNS servers appear to be the same for both domains on this search. Let me do some more *cough* digging *cough* and I'll let you know...
kevin@Cerberus$ dig T_ANY daniweb.com
; <<>> DiG 8.3 <<>> T_ANY daniweb.com
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 6, ADDITIONAL: 2
;; QUERY SECTION:
;; daniweb.com, type = A, class = IN
;; ANSWER SECTION:
daniweb.com. 4H IN A 69.13.146.64
;; AUTHORITY SECTION:
daniweb.com. 4H IN NS ns2.propagation.net.
daniweb.com. 4H IN NS ns3.propagation.net.
daniweb.com. 4H IN NS ns4.propagation.net.
daniweb.com. 4H IN NS ns.propagation.net.
daniweb.com. 4H IN NS ns1.lax.propagation.net.
daniweb.com. 4H IN NS ns2.lax.propagation.net.
;; ADDITIONAL SECTION:
ns2.lax.propagation.net. 3h27m28s IN A 66.34.193.2
ns4.propagation.net. 1h23m21s IN A 63.249.128.203
;; Total query time: 72 msec
;; FROM: Cerberus.geekis-kahn.net to SERVER: default -- 167.206.3.166
;; WHEN: Tue Mar 23 13:42:18 2004
;; MSG SIZE sent: 29 rcvd: 203
This is for www.daniweb.com:
kevin@Cerberus$ dig T_ANY www.daniweb.com
; <<>> DiG 8.3 <<>> T_ANY www.daniweb.com
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 6, ADDITIONAL: 3
;; QUERY SECTION:
;; www.daniweb.com, type = A, class = IN
;; ANSWER SECTION:
www.daniweb.com. 4H IN A 69.13.146.64
;; AUTHORITY SECTION:
daniweb.com. 4H IN NS ns1.lax.propagation.net.
daniweb.com. 4H IN NS ns2.lax.propagation.net.
daniweb.com. 4H IN NS ns2.propagation.net.
daniweb.com. 4H IN NS ns3.propagation.net.
daniweb.com. 4H IN NS ns4.propagation.net.
daniweb.com. 4H IN NS ns.propagation.net.
;; ADDITIONAL SECTION:
ns1.lax.propagation.net. 3h49m27s IN A 66.34.193.1
ns2.lax.propagation.net. 3h12m42s IN A 66.34.193.2
ns4.propagation.net. 1h8m35s IN A 63.249.128.203
;; Total query time: 96 msec
;; FROM: Cerberus.geekis-kahn.net to SERVER: default -- 167.206.3.166
;; WHEN: Tue Mar 23 13:57:04 2004
;; MSG SIZE sent: 33 rcvd: 223
The DNS servers appear to be the same for both domains on this search. Let me do some more *cough* digging *cough* and I'll let you know...
If you spend more on coffee than on IT security, you will be hacked.
What's more, you deserve to be hacked.
-- former White House cybersecurity czar Richard Clarke
What's more, you deserve to be hacked.
-- former White House cybersecurity czar Richard Clarke
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,972
Reputation:
Rep Power: 32
Solved Threads: 117
OK Cool thanks. propagation.net is my webhost where I have a dedicated server. (Well, duh, that info was obvious already). But, yeah, either in .htaccess or via httpd.conf I'd like to have daniweb.com redirect to www.daniweb.com
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
•
•
Join Date: Aug 2003
Location: Jersey - You gotta problem wit dat?
Posts: 334
Reputation:
Rep Power: 8
Solved Threads: 5
•
•
•
•
Originally Posted by cscgal
My httpd.conf file does, indeed, have www.daniweb.com as a VirtualHost
Is it a VirtualHost or the ServerName? It actually does make a difference...
If you spend more on coffee than on IT security, you will be hacked.
What's more, you deserve to be hacked.
-- former White House cybersecurity czar Richard Clarke
What's more, you deserve to be hacked.
-- former White House cybersecurity czar Richard Clarke
![]() |
•
•
•
•
•
•
•
•
DaniWeb Linux Servers and Apache Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
apple bbc cd cellphone choose code computer core debian dell desktop development drivers enterprise fedora fiji games gentoo gpl hardware ibm infrastructure install kernel laptop linux marketing microsoft mobile news novell open open source openoffice operating os palm preinstall red hat rhel security server source sun system ubuntu unix vista web windows
- Previous Thread: please help a newbie out with apache
- Next Thread: no website configured at this adress



Linear Mode