I am trying to forward mydomain.mx to mydomain.com/mx.
Currently, it only forwards to mydomain.com.
What in my context is incorrect, please? Does this require 2 page rules?
(asterisk)mydomain.mx/(asterisk)
Forwarding URL (301 Permanent Redirect)
I am trying to forward mydomain.mx to mydomain.com/mx.
Currently, it only forwards to mydomain.com.
What in my context is incorrect, please? Does this require 2 page rules?
(asterisk)mydomain.mx/(asterisk)
Forwarding URL (301 Permanent Redirect)
Hello @kacey!
You just need to create a forwarding page rule either 301 or 302 (depend on your need) with the configuration as follow:
Pattern: mydomain.mx/*
Redirect to: https://mydomain.com/mx$1
the $1 means that you’re keeping the URI in the redirection, have a look at that guide for more explanations: https://support.cloudflare.com/hc/en-us/articles/218411427
Thank you so much, @stephane,
Unfortunately I must have something else interfering as it is not working for me. I tried a few variations as well. Any thoughts on what else I could look at?
With nothing else in your root htacess file (mydomain.mx)
add this simple 301 that directs the new location.
Nothing else, just this.
Redirect 301 / https://mydomain.com/mx/
This snippet is the same as on css tricks,
under snippets > htaccess > redirects
When i’m doing a request on www.protemaxseguro.mx i’m being redirected to www.protemaxseguro.com/mxwww so i assume that you’re using two Wilcard in your page rule. If yes, you’d use $2 at the end of the redirection pattern since that represents the second wildcard catch.
Then, you probably have a redirection in your webserver because the 301 is working normally since I’m seeing the /mxwww but I’m directly redirected (302) again to /.
This isn’t a Cloudflare configuration, didn’t see anything doing that in your second CloudFlare domain.