Saturday, August 13, 2011

Making Wordpress work without htaccess

To make work Wordpress pretty permalinks structure you need htaccess on your site. htaccess is a file that is at the root of your web site to make the Apache rewrite mode work with structured url.
The default "ugly" Wordpress url looks like this:

http://mysite.com/?p=SOME_NUMBER
To change this url structure to a prettiest one like this:

http://mysite.com/year/month/post-name/
You need htaccess enabled, but sometimes your webhosting doesn't allow htaccess, so here is the fixing for it:
Connect to the wordpress-admin dashboard and go to Settings > Permalinks
Choose the custom structure option and fill the field with these values:

/index.php/%year%/%monthnum%/%postname%/

The trick here is adding the /index.php/ before the other parameters and that is telling the path info to take the index document (index.php) into consideration, this will make work Wordpress without htaccess.
Well, this this is an "almost" pretty solution to make work Wordpress without htaccess as you will always have the index.php in between your url path.
In fact if you are working in a serious site that is important to you it is better to consider a good webhosting with everything in it.
And you can always use blogger that has everything on it for free! lol

0 comments:

Post a Comment

Your opinion is very appreciated, thank you!