tags:

views:

38

answers:

1

I am using apache server for work with wordpress...In my application; retrieving some values from user created table and displaying it. when click on a product description which shows the full details of that product.ie, http://localhost/demotile/?productid=59961 this url am following for get the details.here how can i rewrite the url as http://localhost/demotile/............please help me

A: 

If you login to wordpress dashboard, goto

Settings->Permalink

Change "Common settings" from default, select custom and input

/%postname%/

click "Save Changes"

if you get a message at the bottom of the page regarding your .htaccess file and not having permissions, you may have to create this file yourself.

open a new text file and copy/paste the info at the bottom of the screen, or copy this..

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

save this as ".htacess" {No filename - Just a Dot} do this by saving the file with a name, then go to that file and hit F2 to rename, delete the filename just before the {dot} and change any file extention at the end: ie: "yourfile.txt" should then become ".htaccess" upload this into the root of your website hosting folder.

ie: public_html or www or htmldocs

As long as mod re-write is enabled on your host this will produce the following url http://yourblog.com/your_post_title_or_product

If you are using a custom Wordpress plugin then you may have to check see which permalink structure is in use...

to do this use the..

if ( get_option('permalink_structure') != '' ) { echo 'permalinks enabled' } 

you may have to look into using htaccess to generate your nice urls..

perishablepress.com

Marty
nice explanation marty....really apreciable.thank you so much for your help
Ajith