Community Forums › Forums › Archived Forums › General Discussion › Links no longer working!
- This topic has 17 replies, 6 voices, and was last updated 8 years, 3 months ago by robyn.
-
AuthorPosts
-
December 23, 2015 at 10:23 am #174645robynMember
Hi! I'm building a website and for some unexplainable reason, ALL the links on my site stopped working overnight.
The homepage shows up but all the links go to a "not found" page when they were all working fine yesterday. Please help ASAP with ideas as I have a meeting in an hour to show the site to the client and have no idea what is going on.
Thanks for any guidance anyone can provide...quickly please!
http://otbc.org/otbc-wp/December 23, 2015 at 11:05 am #174650SusanModeratorRobyn:
Switch your permalinks back to default and save, to see if that resolves your issue. It sounds like an .htaccess issue. You can read more about that here (link)
December 23, 2015 at 11:13 am #174653robynMemberThanks. I tried that but it still won't work. I'll try again. The weird thing is they've been working fine for a month or so. Could it have been broken by a genesis update?
December 23, 2015 at 11:22 am #174654SusanModeratorRobyn:
Whether it was broken by a Genesis update would just be speculation. To test, switch to a default WordPress theme (such as TwentyFifteen), to see if that resolves your issue.
If it doesn't, I recommend talking to your hosting company.
December 23, 2015 at 2:26 pm #174664robynMemberI tried resetting the permalinks and updating the htaccess file. It didn't help. Any other suggestions of things to try and/or check?
I'm worried that if I switch to a default WordPress theme, I'll loose all the customizations I've done to the genesis child theme (education pro). Will those get lost if I switch themes and then back?
December 23, 2015 at 7:23 pm #174683SusanModeratorYou won't lose your customizations; they will remain in the background, and will revert back when you reactivate the theme (just don't delete the theme!)
December 28, 2015 at 12:04 pm #174961robynMemberThis problem has not been resolved. Please help. Does anyone have any other suggestions of what I could try to get my links working again? I switched my permalinks to the default and they work that way but I need pretty permalinks, not the default ones. When I try to switch back to pretty permalinks the links break again. Is there a special code I can put in my htaccess file to make this work again? They worked perfectly for about a month and then stopped working overnight. I have no idea why. I have found a workaround for now from a post I saw somewhere. By adding index.php to the custom structure the links will work. (/index.php/%postname%/) but this can only be a temporary solution. I need the links to work as /%postname%/ (without the index.php in the URL).
This is what the htaccess file now reads:
# 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># END WordPress
I've tried changing the htaccess file (as wordpress told me to do when I switched to pretty permalinks) to:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /otbc-wp/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /otbc-wp/index.php [L]
</IfModule>
# END WordPressAnd this doesn't work. It breaks the links again. I've tried only changing the rewrite rule as well, no luck either.
Any and all suggestions would be greatly appreciated! Thank you!
December 30, 2015 at 11:58 am #175211weslindaMemberI would do two things initially. First, i'd try emptying the htaccess file and then resetting your links and attempting as instructed. Don't edit it directly your way.
Second, I'd connect with your host and see if you're getting any specific htaccess errors. This might be a host configuration issue if links aren't working properly on their site.
If those two things don't work, you might want to check to make sure there aren't any plugins messing with the URL structure.
If that doesn't work, it might be good to get someone access and let them look through the configuration for you.
Loving the Genesis Life!
January 6, 2016 at 12:48 am #175714robynMemberThanks. I tried emptying the htaccess file and it didn't work. I spoke with my host and it looks like something (a plugin?? an update??) is messing with the htaccess permissions. The permission keeps reverting to unwritable when I try to make pretty permalinks. When I set the permalinks to default it works fine though. I tried deactivating all of my plugins and it doesn't fix the problem. I am at a loss.
Any other suggestions?
January 6, 2016 at 2:19 am #175717devParticipantThere might be something here that will help you:
January 6, 2016 at 3:16 am #175721robynMemberI'm still trying to work this out. Have tried everything. I tried changing themes and that didn't help. I tried deactivating all my plugins and that didn't help.
When I have the pretty permalinks as /index.php/%postname%/ , the links work. But I need it work without the index.php in the URL. Every time I rewrite the htaccess code to:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /otbc-wp/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /otbc-wp/index.php [L]
</IfModule>
# END WordPressIt immediately rewrites it to:
# 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>
# END WordPressand removes the permission to make the htccess writeable.
The permalinks worked perfectly for a month then stopped working overnight.... I've got to get this site working for my client ASAP and have run out of ideas...
Thanks for any help or guidance anyone can provide!
January 6, 2016 at 9:31 am #175741mikeus100MemberJanuary 6, 2016 at 10:50 am #175752robynMemberThanks. I did. They said it wasn't on the hosting end and weren't any help. Seems some code somewhere is rewriting the permissions of the htaccess file. Feels like there should be some override I can write in somewhere but I don't know what that would be.
January 6, 2016 at 3:48 pm #175786devParticipantWhere are you hosting this?
I think the problem you MAY be having is that you are running Apache as "nobody" being the owner and when that happens often any rewrite (especially an update) will cause a the permissions of those files to be reset.
See if your host can use fcgi and/or "sudo exec"and let you run Apache as (under) your own user name and that would (maybe) fix the issue.
I don't know of any code in WP (and surely none in Gen) that would re-write the file permissions. That is on the host side and for the to tell you otherwise, tells me that they do not know what they are talking about.
If they can't fix this, then consider moving to a different host. We use pair.com but there are lots and lots of good hosts out there.
January 6, 2016 at 3:54 pm #175787robynMemberThanks. Host is Bluehost. What doesn't make sense is that it all worked fine for over a month. No rewrite or permissions problems at all. Then this started happening. Seems to point to an errant plugin but none seem to be the culprit... I'll give Bluehost a call and give them your suggestions. Thanks!
January 6, 2016 at 4:41 pm #175791devParticipantBluehost is now owned by Endurance International Group (EIG.) I won't say anything that they might sue me over but you should Google both... and maybe you will understand why you are having issues. We won't do a site for any client on BH or GoDad or HostGator... because other clients have had so many issues with each.
Let us know how it turns out.
January 6, 2016 at 5:01 pm #175794carasmoParticipantYes! I switched to InMotion because they are not owned by EIG. Horrible!!!! I save at least 6 hours of pain when clients don't have hosting with any of the three you mentioned. It took 3 weeks of tech support tickets and tweeting to get HostGator to do a simple thing.
January 8, 2016 at 2:44 am #175924robynMemberDev, the link you sent unlocked the key! Thank you!! I installed the Sucuri security plugin and tested for malware and file integrity. Sucuri found that we had been hacked and some malicious code was injected in the nav-menu.php which caused the htaccess to reset to 444 continuously. Sucuri was able to restore the files that had been corrupted and my htaccess permissions are working again as are my pretty permalinks. Phew! Thanks so much everyone for your help!
-
AuthorPosts
- The topic ‘Links no longer working!’ is closed to new replies.