Advanced Redirects and Restrictions
I have one page that refuses to redirect to the right page.
Using the code in the documentation above we moved adaptflorida to jaxtoday/adapt. I have it all going to the right place in it’s new home, except for adaptflorida/about. Instead of going to jaxtoday/adapt/about it goes to jaxtoday dot org/about.
I’ve done this a few times before on other sites. For example, jaxmusic redirects to wjct/jaxmusic. And jaxmusic/about has no problems redirecting to wjct/jaxmusic/about.
As far as I can tell, I have set up everything correctly. What is going on?!
Sorry about the lack of URLs. The forum wouldn’t let me put in more than one .org in the post. All of our domains are .org.
Thanks for popping in @RayHollister! I am sorry to hear you are having issues here. I am going to tag some of our wonderful technical writers/doc gurus to see if someone can help here.
@edwardangert @joan.edwards @michalsen @audrac any thoughts here?
I got it! It was a stupid typo on my part! I left the forward slash at the end of the folder name:
$newurl = 'https://jaxtoday.org/adapt/'. $_SERVER['REQUEST_URI'];
$newurl = 'https://jaxtoday.org/adapt'. $_SERVER['REQUEST_URI'];
it’s a slash that’ll get you
thanks for checking back in with your solution, @RayHollister !
Seems like something others might get stuck on as well.
Looking at the doc, in the Redirect from Subdomain to Subdirectory Path section, it says:
The following configuration will redirect requests for
Do you think it’d be helpful if we:
- remove the trailing
/ from the example URL
- add a note to say something like, “don’t use a trailing
/ unless you want to [something - I’d have to get that info]”