plates icon indicating copy to clipboard operation
plates copied to clipboard

Setup plates.thephpleague.com

Open reinink opened this issue 8 years ago • 2 comments

Right now the only League project using a custom domain is this one (platesphp.com). There really isn't any reason for this.

  • [ ] Add the CNAME plates.thephpleague.com DNS record
  • [ ] Update /docs/CNAME
  • [ ] Figure out 301 redirects for all the old addresses (this is the hard part)

reinink avatar Dec 28 '16 00:12 reinink

How you pretend to redirect all the old addresses?

odahcam avatar Aug 16 '17 00:08 odahcam

How you pretend to redirect all the old addresses?

Why would you need to pretend to redirect? I'd have the old domain DNS point to a server running either apache or nginx and have the virtual host config do a domain to domain 301 redirect.

Apache

RewriteEngine on
RewriteCond %{HTTP_HOST} ^platesphp.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.platesphp.com [NC]
RewriteRule ^(.*)$ http://plates.thephpleague.com/$1 [L,R=301,NC]

Nginx <0.9.1

server {
  server_name .platesphp.com;
  rewrite ^ http://plates.thephpleague.com$request_uri? permanent;
}

Nginx >=0.9.1

server {
  server_name .platesphp.com;
  return 301 http://plates.thephpleague.com$request_uri;
}

carbontwelve avatar Nov 28 '17 09:11 carbontwelve