-
I am using the rankmath plugin to try and redirect all URLs under a subfolder but it is not firing:
source URL: locations/phillipsburg-nj/(.*)
to go to: https://www.mosquito-authority.com/locations/
Type: Regexfor example, https://www.mosquito-authority.com/locations/phillipsburg-nj/popcorn/ does not redirect
-
Hello,
I apologize for the issue you are facing with the redirection using Rank Math. To redirect all URLs under a subfolder using Regex in Rank Math, you need to ensure the correct setup. Based on your provided information, here is how you can set up the redirection:
- Source URL:
locations/phillipsburg-nj/(.*)
- Destination URL: `https://rankmath.com/kb/redirect-all-amp-pages-to-non-amp-pages/
- Type: Regex
Here is how the redirect setup should look like inside Rank Math:
Make sure to activate the redirect after adding the details. Click on Add Redirection to save the regex redirect settings.
After setting up the redirection as mentioned above, the URL
https://rankmath.com/kb/redirect-all-amp-pages-to-non-amp-pages/ should redirect correctly to
https://rankmath.com/kb/redirect-all-amp-pages-to-non-amp-pages/If the issue persists or if you need further assistance with this redirection setup, please feel free to reach out to our dedicated support team by clicking here.
Thank you for bringing this concern to our attention.
Sources:
Redirect all AMP pages to non-AMP pages » Rank Math
How to Use Regex Redirects in Rank Math » Rank Math
How to Use Regex Redirects in Rank Math » Rank Math
How to Manage Affiliate Links Using Rank Math » Rank Math
How to Redirect Posts After Changing URLs » Rank MathThis did not answer my question. Just looking to redirect everything under the subfolder /locations/phillipsburg-nj/ to https://www.mosquito-authority.com/locations/
Hello,
Thank you for your patience.
Upon checking your site, it seems there’s a website installed per location.
For troubleshooting, please clear your website and server cache.
If the redirect is still not working, you may rename the /phillipsburg-nj/ folder so it won’t affect the redirection from your main site.
Let us know how this goes.
Hello! We are using a third-party to manage the location sites BUT we have a way to say that we want certain subfolders to be managed by the WordPress instance. That is the case for this one as I am easily able to add a redirct for /locations/phillipsburg-nj/ but not the entire subfolder.
Please help me if you can – i can redirect the single URL but not the subfolder
Hello,
We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress login in the designated Sensitive Data section.
Please do take a complete backup of your website before sharing the information with us.
It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
We really look forward to helping you.
What email address should we use for the WordPress user? We have 2FA set up so you need an email to use.
Hello,
You can use s******@r*********** as the email for the temporary login.
Once you are done, please share the generated temporary login URL with us in the designated Sensitive Data section.
Let us know how it goes. Looking forward to helping you.
Anyone have an answer here?
Where are we at here?
Hello,
We deeply apologize for the unexpected delay in response. Your previous reply seems to have been stuck in our drafts section for some reason.
After checking your website, we can see you’re currently using the Yoast SEO plugin on your site. Could you please try to deactivate this plugin and install the Rank Math again so that we can check the issue further for you?
Looking forward to helping you.
Thank you.
We are not using the Yoast SEO plugin on our site. We are using the Yoast duplicate post plugin but that’s it.
Hello,
It seems like you have marked this ticket as resolved. If you still require assistance, please share the temporary access with us again so that we can continue to troubleshoot this issue.
Thank you for choosing Rank Math.
Hello,
The single location pages you intend to redirect are showing server-generated generic 404, meaning, the client hasn’t reached WordPress and since Rank Math is under WordPress, the redirection rule you created didn’t get the chance to initiate.
If you check the screenshot below, all the URLs under location are showing a server 404 while regular pages are showing 404 generated by your theme:
So for the redirection to work, the client must reach the theme-generated 404 or the WordPress 404 template.
You may need to contact either your hosting or your theme author to address this issue.
Looking forward to helping you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.
- Source URL:
The ticket ‘Redirect all URLs under a Third Level Subfolder’ is closed to new replies.