• Resolved orion1s

    (@orion1s)


    Hi, I have set up 2 redirects on a website, the 1st one works fine, the 2nd one, which uses a regex, doesn’t. Maybe I have the syntax on the regex incorrect, but I don’t think so.

    Here’s a screen shot of the redirects I have set up:

    View post on imgur.com

    The first one redirects from the /blog/ subfolder to a new subdirectory: blog.sixages.com, and that works fine. But I also want all the posts and category pages in the blog to route to their appropriate page in the subdomain, but it doesn’t do anything, the address still resolves to the old address as before. Only if I use the plain /blog/ address does the redirect work. Do I have my syntax on the regex correct?

Viewing 1 replies (of 1 total)
  • Hi @orion1s,

    Your regex should not have the dollar sign $ on the source URL. Everything else looks fine to me, assuming your intend to keep the target URL using the protocol “http” instead of “https”.

    I’ve noticed you have https on on your blog. So if you plan on using https for good (which you should, if not for the security issue, then because Chrome will soon start labeling all http websites “not safe” on the address bar), you should probably make redirects from the current source URLs to their https equivalent on the new URLs. If you later implement a https-only policy, you won’t need to have a double redirect, one from /blog/ to blog.example.com, and another from http to https.

    Regards,
    CB

Viewing 1 replies (of 1 total)
  • The topic ‘Redirect regex not working’ is closed to new replies.