WordPress permalink change throws 500 Internal Server Error - php

I am changing my permalink structure in wordpress admin panel,
after changing this, when I click on post its throwing Internal server error
if changing it to default permalink structure , its working fine.
changing permalink setting in my localhost is working fine , but in staging server its throwing internal errors, I checked my .htaccess file in staging server , new rules are getting updated , but its showing internal error issue which is not coming in localserver.
I am using Wpengine webhost .
and I am in staging server mode.
How can I get rid of this problem

Talk to your webhost; your changes are not being written to .htaccess or your webhost doesn't allow .htaccess and mod_rewrite to be used.
See http://codex.wordpress.org/Using_Permalinks
If you're on a Windows server, see http://codex.wordpress.org/Using_Permalinks#Permalinks_without_mod_rewrite

You trying to rewrite the url two times:
.htaccess file
WP Permalink settings
Get rid of your .htaccess file
(or comment first line)
<IfModule mod_rewrite.c>
# RewriteEngine On
RewriteBase ./
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . ./index.php [L]
</IfModule>
hope this will help.

If you installed wordpress in a subdirectory you need to change the line
RewriteRule . /index.php [L] (last line before /IfModule) with RewriteRule . subdirectoryName/index.php [L]
Change subdirectoryName with the name of the subdirectory that wordpress is installed.

Related

Wordpress post showing 404 error in subfolder?

I have installed wordpress in main domain (fewinfo.com) and its running successfully. now, i have installed wordpress in subfolder (fewinfo.com/wp) but when i check post inner page it shows 404 error.
I have updated .htaccess using below code but not working and also I have tried without "wp" that also not working.
NOTE : Website have hosted in Godaddy
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php [L]
</IfModule>
# END WordPress
Go to Settings » Permalinks, and simply click on Save Changes button.
You can replace or export data using Wp Migrate DB.
Easy to replace any url in your current database without lose any data or serialization issue.
Changing the Site URL multiple ways.
After Change Url Update:
Go to
Settings » Permalinks
Update permalink.

Moving wordpress site from hosting to localhost for development

After moving website to my local dev machine, relative links stopped working. When i click button with relative link /login, for example, browser redirects to
https://localhost/login/
and shows
Code: Not Found
The requested URL /index.php was not found on this server.
While it should have redirected to https://localhost/сс/login/
.htaccess contents on localhost:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /cc/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /cc/index.php [L]
</IfModule>
Website files are in var/lib/html/cc folder.
SiteURL and HomeUrl
are both equal to http://localhost/сс
Parmalinks setting http://localhost/cc/sample-post/ is used, so no problem with navigating to pages.
How to fix this issue?
Tried different .htaccess modifications, moving index.php to /var/lib
Nothing helps.
just use WP Migrate DB plugin for database export , it will change all link to your desire link and use this database export file in live site
Link ( https://wordpress.org/plugins/wp-migrate-db/)

Why isnt localhost loading all the correct resources of my wordpress application?

I am trying to copy down my web app from the internet to localhost on my machine for further development. The URL of my project is www.uniformlab.net. I am new to wordpress and this site is the biggest one that I have tried to copy.
I am using MAMP as my local server and have set up all the correct variables in getting the database set up. Some resources are loading and many are not, with a large download time.
This is a list of errors that are being thrown on runtime of the website. I don't think that these resources are being called from an absolute path.
I have set the home and siteurl settings in the DB to locahost:80/UNIFORMLAB
When I change the url to localhost/uniformlab/wp-admin, I am getting thrown ERR_TOO_MANY_REDIRECTS by the browser.
I have checked my htaccess file and it seems normal. This is what I have:
# 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
Any help would be appreciated.
There is not too much info, but one thing is that the home and siteurl in WordPress have to be the full path to the WordPress directory.
You said that your URL is http://localhost/uniformlab but you changed the setting to localhost
Update again the home and siteurl to http://localhost/uniformlab

Wordpress site on AWS throws 404 error on all but homepage

I have a site that is live on AWS - Wordpress, latest version, custom theme
It works fine in MAMP on my laptop, but on the live site, none of the pages besides the homepage work with the permalinks as /%post-name%/
I can make the permalinks work if I change them to default.
I don't think it has to do with htaccess, I've tried scrubbing it, we made some edits to it, and that has not made a difference.
Here are the contents of htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ucampaign/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /ucampaign/index.php [L]
</IfModule>
I think it has to do with settings in the AWS instance, which I know can get complicated. But I wouldn't know where to look.
Thank you for looking at this, if there's more information needed to figure this out, I will be happy to provide :-)
Looks like a missing mod_rewrite. check apache config for that. Also, make sure Apache is reading the .htaccess file. When I say check to make sure the .htaccess is being read, does the server throw an error when you place junk inside the .htaccess file? What type of OS are you running on AWS?

wordpress blog. too many redirect error on chrome, blank page on FF

I have a wordpress blog and it was working correctly but suddenly I get blank page on FF when I try to browse to mydomain/wp-admin. on Chrome I get error too many redirect. when I browse to the site itself it open fine.
I disabled all plugins and removed most of them but that did not solve my problem.
I change permalink to default and that solve the problem but I need to use pretty url (postname)
my .htaccess file with permalink set to postname
# 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
Thanks
I found the problem
I was placing directory password on mydomain.com/wp-admin for extra security. but why that cause too many redirect error ???? any one ?
I think you are using hosting with Windows Operating System..
Windows OS doesnot allow you to write .htaccess file..
I found the problem I was placing directory password on mydomain.com/wp-admin for extra security. but why that cause too many redirect error ????

Categories