Hi gunnerman1,
Please check if the plugin provides you setting on settings->permalink section. If is it so you can customize it directly from here.
Can you please provide link of your site , so I can understand the scenario more clearly.
Thanks
Hi gunnerman1,
That’s really odd. I believe that you’ve got to have somehting interfering the the URL in order to make the testimonials appear at /blog/testimonials.
A few questions:
- Are there different plugins or theme active locally versus on the server?
- Is the functions file in both places identical?
- Are you using the slug
testimonials for a blog post?
- Are you using an SEO plugin that allows you to rewrite URLs?
- How about a redirection plugin like Redirection?
- Finally, what’s your
.htaccess look like?
Thanks!
Thanks for the replies.
No, there is no provided setting in permalink section.
To answer Eric’s questions:
1. There are different plugins but any plugin that is activated on the server is also active locally. The local server has a couple more active plugins such as CM Tooltip Glossary, Interactive World Maps, Multipurpose Sliders, etc. Both are using the same theme.
2. Functions file is identical in both places. Our local version has a few utility functions but they are not registered or used anywhere.
3. Not entirely certain what you are asking but I don’t believe so. We want all of our blog posts to be at /blog/%postname%, all of our pages at top level, and our testimonials at /testimonials/%postname%. We never use testimonials in any of the slugs or names.
4. We have the standard version of Yoast SEO installed which I don’t believe offers any rewriting functionality.
5. We use the Quick Redirects plugin since we recently changed our permalink structure from /%postname%/ to /blog/%postname%/ we wanted to make sure we had the 301 set up for any straggling links in blogs we missed etc.
6. .htaccess on local site is default WordPress
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
The server side has some Cache Control entries but the problem persists even when they are removed.
Thanks
5. We use the Quick Redirects plugin since we recently changed our permalink structure from /%postname%/ to /blog/%postname%/ we wanted to make sure we had the 301 set up for any straggling links in blogs we missed etc.
I think this may be your answer here. It sounds like you’re doing a blanket redirect, which is affecting testimonials too.
By adding the 'with_front' => FALSE it feels like it should fix it, but that probably only fixes the main testimonials page, and the actual testimonial slugs would be broken.
Can you test by disabling that Quick Redirect plugin temporarily and confirming whether it’s contributing to the issue?
Disabled the plugin did not fix it.
When I change ‘rewrite’ => TRUE to ‘rewrite’ =>array(‘slug’ => ‘testimonials’, ‘with_front’ => FALSE) it updates all of the permalinks for the testimonials page from /blog/testimonials/%postname% to /testimonials/%postname%/ in all of the posts but WordPress still requires the old .blog/testimonial/%postname% structure.
Bit of an update. I copied my server db and themes folder to my local version to ensure all of the same files existed. The local version still worked. Then I copied the plugins folder from the server to local so all plugins matched. This broke the local links.
Disabling all plugins one by one until none were activated did not fix the problem but deleting the actual plugin files did. I found when I use my local version of the ivycat-ajax-testimonials plugin everything works. When I use the server version it does not.
I deleted the server version of the plugin and uploaded my local version, still broken on the server. Removed all cache headers in .htaccess, used incognito mode, etc.
I am about out of hair to pull out 🙁
gunnerman1,
Man, that’s got to be super-frustrating!
Are you rebuilding permalinks with each change?
What version of PHP are you running in each environment?
I hit save settings on the permalinks settings page each time. Running PHP 5.6 on both. Do you know where the rewrite rules are stored in the database? We are having a similar problem with a page directing to WooCommerce shop even after it has been unset. Wondering if something got jiggered in the db.
Also when I set permalinks to plain, all works well.
Hey gunnerman1,
Do you know where the rewrite rules are stored in the database?
Of course, WordPress rewrite rules (assuming you’re on a unix-ey system), are in the .htaccess file, which is at the root of your WordPress install and should look like what you posted earlier. If that’s default WordPress, than it’s got to be something in your database and Quick Redirects is the thing that makes the most sense.
RE: Quick Redirects storage of redirects – I really don’t as I’ve no experience with that plugin. Might ask that developer.
I’d have assumed that it was stored in the wp_options table.
We are having a similar problem with a page directing to WooCommerce shop even after it has been unset.
Again, this makes me think you should look more closely at that Redirects plugin.
Thats what I thought but I tried to have WordPress recreate the .htaccess file by deleting its contents and flushing the rules as per the instructions but it never recreates it; have to do it manually. Changing the permalink structure also does not make any changes to the .htaccess file.
I will try and remove the redirect plugin and see where I get.
Thanks
but I tried to have WordPress recreate the .htaccess file by deleting its contents and flushing the rules as per the instructions but it never recreates it; have to do it manually. Changing the permalink structure also does not make any changes to the .htaccess file.
There’s definitely something fishy going on. Is it possible that there’s some server security like ModSecurity blocking requests, or getting in the way?
If you were to blank out the .htaccess file and Save Permalinks within the wp-admin, you should see all the rules recreated. If that’s not happening, either something on the server, or in your WP install is hiccuping.
If removing the plugin doesn’t help, you might check with your host to see if they can see anything else on their end.
I resolved the problem (in part). After a bit of digging I found the db entry rewrite_rules was missing in the options table. Whenever I copied this db to my local install this table entry would be created by WordPress on the first page load.
The server does not seem to create this entry no matter what I try. I manually added the entry into the server db from my locally created entry and now all of the links/redirects work properly. I know this is a serialized entry and not sure what implications that may have…
Unfortunately I fear the underlying problem still exists since WordPress still will not update htaccess files etc. Though at this point I have spent far too much time on this issue and since it is working ‘good enough’ for now I will need to let it be for a while.
Thanks for all of the help. Very much appreciated.
Glad you resolved the issue. Good luck with your .htaccess woes.
Cheers!