Jump to content
xisto Community
Sign in to follow this  

How To Make Permalink In Blogs?

Recommended Posts

Can someone give me idea what is term 'permalink' in blogs using php.. and for example if i have a post like, myblog.php?post_id=xxx&cat_id=zzz how i can make like permalink of this post ??

Share this post

Link to post
Share on other sites

according to wordpress.org,

Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings. A permalink is what another weblogger will use to refer to your article (or section), or how you might send a link to your story in an e-mail message. Especially when they are used to link to individual postings, once a story is posted, the URL to it should be permanent, and never change. Hence the "perma" in the name.

They're generally used to make urls simpler to remember.if mod_rewrite is available, you could set up an .htaccess file that looks like this:

<IfModule mod_rewrite.c>RewriteEngine onRewriteRule ^index/([0-9]+)/([0-9]+)/?$ /index.php?id=$1&cat_id=$2 [L]</IfModule>
This would make it so that the link site.com/index/11/223/ would actually be site.com/index.php?id=11&cat_id=223

here are a couple of resources you could look at for mod_rewrite:
Edited by andybebad (see edit history)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.