Permalink Structure and .htaccess File
I wanted to change the structure of permalinks in the blog. Why? Wordpress’ default permalink structure is http://www.itcserver.com/blog/?p=123
But when you go to Options - Permalink, it says:
By default WordPress uses web URIs which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URI structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links.
I chose Date and Time based permalink structure http://www.itcserver.com/blog/2006/02/18/sample-post/ I had to look what other blogers use. I checked several blog sites and realized Date and Time based permalink structure is used mostly. It seems it is easy to permalink structure. Go to Options - Permalinks - Choose Date and time based permalink structure, and then press Update Permalink Structure. But after that a message appeared.
If your
.htaccessfile were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your.htaccessfile. Click in the field and press CTRL + a to select all.
I went to the blog and checked some posts but they did not work. Why? Becasue I should have updated .htaccess file. All right. What is this .htaccess file? Where is the .htaccess file? I logged into server by ftp. Bu I could not find it on root folder of WordPress.
What I understood is .htaccess file is a very important file. It not editable from WordPress admin panel.
If you do not already have a
.htaccessfile, create one. If you have shell, or ssh access to the server, a simple touch.htaccesswill create the file. If you are using FTP, create a file on your local computer, call it1.htaccess, upload it to the root of your WordPress install, and then rename it to.htaccess.
.htaccess file:
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php
What are those codes? Comprehensive guide to .htaccess
The conclusion Options - Permalinks - Date and time based - Update Permalink Structure. It worked right now with .htaccess file.