PDA

View Full Version : 301 Redirect


nickburrett
09-04-2009, 03:51 AM
Anyone got any idea what I'm doing wrong here?

I'm trying to consolodate all my domains into one domain.

RewriteEngine on

redirectMatch 301 ^(.*)$ http://www.bridgwaterdiscos.com
redirectMatch permanent ^(.*)$ http://www.discos.me.uk/coverage-area/bridgwater-wedding-dj-and-disco/

redirectMatch 301 ^(.*)$ http://www.devondiscos.co.uk
redirectMatch permanent ^(.*)$ http://www.discos.me.uk/coverage-area/devon-wedding-dj-and-disco/

redirectMatch 301 ^(.*)$ http://www.discos.co.uk
redirectMatch permanent ^(.*)$ http://www.discos.me.uk/

redirectMatch 301 ^(.*)$ http://www.dorsetdiscos.co.uk
redirectMatch permanent ^(.*)$ http://www.discos.me.uk/coverage-area/dorset-wedding-dj-and-disco/

redirectMatch 301 ^(.*)$ http://www.gloucestershirediscos.co.uk
redirectMatch permanent ^(.*)$ http://www.discos.me.uk/coverage-area/gloucestershire-wedding-dj-and-disco/

redirectMatch 301 ^(.*)$ http://www.somersetdiscos.co.uk
redirectMatch permanent ^(.*)$ http://www.discos.me.uk/coverage-area/somerset-wedding-dj-and-disco/

redirectMatch 301 ^(.*)$ http://www.soulfunkdj.co.uk
redirectMatch permanent ^(.*)$ http://www.discos.me.uk/

redirectMatch 301 ^(.*)$ http://www.tauntondiscos.com
redirectMatch permanent ^(.*)$ http://www.discos.me.uk/coverage-area/taunton-wedding-dj-and-disco/

redirectMatch 301 ^(.*)$ http://www.wedding-dj-devon.co.uk
redirectMatch permanent ^(.*)$ http://www.discos.me.uk/coverage-area/devon-wedding-dj-and-disco/

redirectMatch 301 ^(.*)$ http://www.wedding-dj-dorset.co.uk
redirectMatch permanent ^(.*)$ http://www.discos.me.uk/coverage-area/dorset-wedding-dj-and-disco/

redirectMatch 301 ^(.*)$ http://www.wedding-dj-gloucestershire.co.uk
redirectMatch permanent ^(.*)$ http://www.discos.me.uk/coverage-area/gloucestershire-wedding-dj-and-disco/

redirectMatch 301 ^(.*)$ http://www.wedding-dj-somerset.co.uk
redirectMatch permanent ^(.*)$ http://www.discos.me.uk/coverage-area/somerset-wedding-dj-and-disco/

redirectMatch 301 ^(.*)$ http://www.wedding-dj-wiltshire.co.uk
redirectMatch permanent ^(.*)$ http://www.discos.me.uk/coverage-area/wiltshire-wedding-dj-and-disco/

redirectMatch 301 ^(.*)$ http://www.wiltshirediscos.co.uk
redirectMatch permanent ^(.*)$ http://www.discos.me.uk/coverage-area/wiltshire-wedding-dj-and-disco/

redirectMatch 301 ^(.*)$ http://www.westonsupermarediscos.com
redirectMatch permanent ^(.*)$ http://www.discos.me.uk/coverage-area/weston-super-mare-wedding-dj-and-disco/

clunk.werclick
09-12-2009, 09:30 AM
Hi Nick,

Before looking at the rewrite issues a couple of things. Which Apache version do you have running? Is it set to grab the host headers for all those funky disco domains? Is the new .me.uk hosted on the same apache?

I note that there is no DNS resolution for discos.me.uk or www.discos.me.uk (There is no answer section coming up). This may or may not be relevant - depending on if it resolves where you are hosting the site. (It may have a local DNS or HOSTS entry). It could, however, mean that redirects failed. I would resolve the DNS issues before trying to fix anything else.


NOTE - NO ANSWER SECTION:
dig www.discos.me.uk

; <<>> DiG 9.5.0-P2 <<>> www.discos.me.uk
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 5729
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.discos.me.uk. IN A

;; Query time: 582 msec
;; SERVER: 192.168.1.99#53(192.168.1.99)
;; WHEN: Sat Sep 12 08:25:07 2009
;; MSG SIZE rcvd: 34

dig discos.me.uk

; <<>> DiG 9.5.0-P2 <<>> discos.me.uk
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 33404
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;discos.me.uk. IN A

;; Query time: 469 msec
;; SERVER: 192.168.1.99#53(192.168.1.99)
;; WHEN: Sat Sep 12 08:25:15 2009
;; MSG SIZE rcvd: 30

Compared to:
dig www.bridgwaterdiscos.com

; <<>> DiG 9.5.0-P2 <<>> www.bridgwaterdiscos.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33442
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 0

;; QUESTION SECTION:
;www.bridgwaterdiscos.com. IN A

;; ANSWER SECTION:
www.bridgwaterdiscos.com. 14400 IN CNAME bridgwaterdiscos.com.
bridgwaterdiscos.com. 14400 IN A 94.76.220.100

;; AUTHORITY SECTION:
bridgwaterdiscos.com. 86400 IN NS uk1.burrett.net.
bridgwaterdiscos.com. 86400 IN NS uk2.burrett.net.

;; Query time: 136 msec
;; SERVER: 192.168.1.99#53(192.168.1.99)
;; WHEN: Sat Sep 12 08:22:57 2009
;; MSG SIZE rcvd: 119

And just to be sure it's not one of my test DNS servers messing around;

dig @4.2.2.3 discos.me.uk

; <<>> DiG 9.5.0-P2 <<>> @4.2.2.3 discos.me.uk
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 50481
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;discos.me.uk. IN A

;; Query time: 198 msec
;; SERVER: 4.2.2.3#53(4.2.2.3)
;; WHEN: Sat Sep 12 08:33:19 2009
;; MSG SIZE rcvd: 30