The page URLs contain /index.php/home/ that should be removed on the new site.
What do you have in your permalink setting? (SETTINGS => PERMALINKS)
Thanks, Georg. I know I can set the permalink structure in WP admin. But after the completion of the new website, if visitors click on the old indexed links in Google, they should arrive at pages without the new /index.php/home/. Not to the main page or a 404 page.
For example, https://readingmusicalfoundation.org/index.php/home/advocacy/ should land on https://readingmusicalfoundation.org/advocacy/ and so on.
Thank you,
I never said you don’t know you can set permalinks 😀
The /index.php/ is very likely in your permalink setting, that’s why I wanted to know what’s in there. And all I asked for was 30 seconds of your time to check: far less than the time it took to write your response.
The /home/ part is there because ALL the pages are CHILD PAGES of a parent page with the permalink /home/. The only way to get rid of this is to make all the child pages stand-alone PARENT pages.
You need to address these root issues before you set up any redirection, else you’re going to end up with redirection loops on all pages.
For the actual redirection, you have a couple of options. The easiest way is to use a plugin like this: https://ww.wp.xz.cn/plugins/redirection/
Alternatively, you could add a line or two in your webserver’s configuration file to do the redirection at the server level. Your host uses cPanel, which has a redirection feature you could use to create the redirection rules for your web server.
Whatever tool you end up using, since (it seems) you don’t have any POSTs, all you need is a single rule to permanently redirect all requests to /index.php/home/{post-name}/ to /{post-name}/
Good luck!
Hello George,
You’re right. Most of the pages are child pages of the home page. The link structure is: Custom Structure: https://readingmusicalfoundation.org/index.php/%postname%/
The link structure is on the new site: Post name: https://funny-colden.138-197-96-189.plesk.page/sample-post/
Example: https://funny-colden.138-197-96-189.plesk.page/about/
Thank you
Andras
The link structure is: Custom Structure: https://example.com/index.php/%postname%/
Remove the /index.php from the editable part so it becomes just /%postname%/ and the full permalink structure becomes just:
https://example.com/%postname%/
Thank you for your help. 🙂
If all the page slugs remain the same and the related paths are essentially static, you can setup a 301 RedirectMatch rule in .htaccess to effect all redirects that fit this criteria. Any deviants will need different rules.
.htaccess redirects will load the server less than redirects via WP, but it may be more convenient to utilize a 301 redirect plugin. There are several to be found by searching the WP repository.