1

I am getting Internal server error while changing the Permalink in wordpress. What I did was

I changed "Custom Structure" under Permalink settings and gave /%category%/%postname%/

It asked me to put a .htaccess with the following content:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase ./
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . ./index.php [L]
</IfModule>

Then my site become inaccessible i am getting Internal server error. I have my mod_rewrite enabled.

Any help is greatly appreciated. Thanks in advance.

asked Jan 3, 2012 at 15:33
4
  • Can you login to admin panel? Is that live site or you work on localhost? Do you have some other code in .htaccess file? If you can login to admin panel, visit Permalink settings page and then visit your site. Commented Jan 3, 2012 at 18:58
  • Thank you for your reply Marko.. I am doing in my local. I dont have any other code in my .htaccess file. After putting htaccss I cant log into admin pannel also I am getting Internal server error. Do I need to make any other change in .htaccess file other than the abvoe mentioned one. Commented Jan 4, 2012 at 4:00
  • Try it on a server that can handle .htaccess. There's a good chance your local server doesn't know how to use .htaccess. Commented Jan 4, 2012 at 22:08
  • If I put 302 redirect or any other redirection in .htaccess file it is working. If I put this alone it is not working. Commented Jan 5, 2012 at 12:04

2 Answers 2

2

You trying to rewrite the url two times:

  1. .htaccess file
  2. 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.

answered May 13, 2014 at 12:29
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, this worked for me. The existing RewriteBase and RewriteRule lines in .htaccess were set to redirect to a subfolder (my site is on a subfolder on the server but now I provisioned a domain name for it). The lines were before # BEGIN Wordpress line and so WP didn't update them when I changed the site name in settings. WP itself was inserting and managing the correct lines after # BEGIN Wordpress . So removing these earlier lines solved the issue.
0

Finally I figured out the problem it is because of the home entry in wp_options table.

The home value is set as ./ I dont know how it got set. When I delete it the Permalinks works perfectly. No my home entry is Blank ""

Hope it helps some one..

answered Apr 30, 2012 at 11:33

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.