Subscribe For Free Updates!

We'll not spam mate! We promise.

Monday, 14 October 2013

Wordpress Website Crashes After Changing Permalinks Style


If you are familiar with Wordpress, you will know that people loves to change how the permalinks looks like. This is actually good for the search engine. The first time you install Wordpress on your blog or website, the default setting for the permalink ends with numbers.

Hello! Its been a long time since last update. I've been busy studying for my exams and now the final exams has finally ended. Such a big relieve to my brain chemicals :). I intended to do my best updating this blog from the updates and technical stuff that I've learn from my other blog so I can remember back on how to create a wordpress blog.

I was going to post on this technical stuff about permalinks a long time ago but I really don't have the time to do it. I can't even write a simple post because of the limited time I had. Finally I'm here and it is really exiting to be back to the blogging world.

Permalinks can change how search engine search your site
Ok, back to the main topic. This is a stupid error that I did that can make a website crashes or having Internal Server Error. All because a small error in the html and the bizarre thing is, the html itself is created by Wordpress. How funny this can be.


Original default setting:

http://casually-asian.com/?p=123

Change to:

 http://casually-asian.com/sample-post

In order to do this, go to Settings and click on Permalinks on the drop down menu. You will see a few options on how you want your permalinks look like. Click on which one you desire and Wordpress will automatically create a custom html for you to edit the .htaccess file yourself because the settings cannot be change automatically.

This is where I made a terrible mistake. I don't know who's mistake it is actually because I did not create the html. I delete the entire content inside the .htaccess file and paste the new html which supposed to change the permalink style. The website crashes and I have to contact Hostgator for their assist.

Below is the solution made by Hostgator. A simple but highly effective solution :)

The version that I copy and paste (causing error):

[root@gator3268 /home3/name/public_html]# head -n 10 .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># BEGIN W3TC Browser Cache

The changes made by Hostgator:

[root@gator3268 /home3/bebert/public_html]# head -n 10 .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# BEGIN W3TC Browser Cache

Socializer Widget By Blogger Yard
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

0 comments:

Post a Comment