I have a problem where I need to redirect my domain before it hits php. By the time it hits the ability to execute a header, it is too late.
How can I do
Using mod_rewrite
RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.example\.com [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R,L]