I am trying to redirect ALL requests for mydomain.com whether they are something like:
to be redirected to
As long as it has mydomain.com in it, they should see this page - its a we'll be back soon message.
Should I do it in .htaccess or conf? How?
Redirects allow you to forward the visitors of a specific URL to another page of your website. In Site Tools, you can add redirects by going to Domain > Redirects. Choose the desired domain, fill in the URL you want to redirect to another and add the URL of the new page destination. When ready, click Create.
In HTTP, redirection is triggered by a server sending a special redirect response to a request. Redirect responses have status codes that start with 3 , and a Location header holding the URL to redirect to. When browsers receive a redirect, they immediately load the new URL provided in the Location header.
I actually ended up finding the answer on ServerFault:
https://serverfault.com/questions/32513/url-redirect-to-another-page-on-the-same-site
"This example will 302 redirect all URLs to "/underconstruction.html":
RewriteEngine On RewriteCond %{REQUEST_URI} !=/underconstruction.html RewriteRule ^ /underconstruction.html [R=302]
(which translates as "If URI is not /underconstruction.html, redirect to /underconstruction.html")" - Tommeh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With