homepage Welcome to WebmasterWorld Guest from 54.242.18.190
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
how to change php permalinks?
ginx




msg:4092851
 8:35 am on Mar 7, 2010 (gmt 0)

Hello just got a script for my site <snip>
Now i want to change the php permalinks
e.g. If you click at acne link curently the link shows as http://www.example.com/showarticles.php?cat=100
i want it to show as http://www.example.com/acne/

Like wise first article in acne category here (Home >Acne>Whats The Real Cause Of Acne?) shows as http://www.example.com/showarticle.php?article=1770
I want it to show as http://www.example.com/acne/Whats-The-Real-Cause-Of-Acne?

So can someone please guide me how to change the permalinks to make them more SEO friendly.

Thanks :)

[edited by: dreamcatcher at 9:02 am (utc) on Mar 7, 2010]
[edit reason] Exemplified Urls. [/edit]

 

rocknbil




msg:4093002
 7:40 pm on Mar 7, 2010 (gmt 0)

Welcome aboard ginx,

If you click at acne link curently the link shows as http://www.example.com/showarticles.php?cat=100
i want it to show as http://www.example.com/acne/


Mod_rewrite Primer [webmasterworld.com]

Keep in mind many starting new with mod_rewrite get it backwards; you want to link to the SEO friendly link from your site,

http://www.example.com/acne/

The rewrite it to your PHP script.

ginx




msg:4093008
 7:49 pm on Mar 7, 2010 (gmt 0)

can u please elaborate further ? what and where to edit ?

rocknbil




msg:4093027
 8:45 pm on Mar 7, 2010 (gmt 0)

Follow the link in the previous post. You would do this in the root level .htaccess file on most Linux servers.

mod_rewrite documentation [httpd.apache.org]

Hmm, seems like the Apache site is down today!

g1smd




msg:4093037
 9:05 pm on Mar 7, 2010 (gmt 0)

Be sure to look at the right documents for Apache version 1.x or 2.x as appropriate.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved