Welcome to WebmasterWorld Guest from 54.196.5.163

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

how to change php permalinks?

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

New User

5+ Year Member

joined:Mar 7, 2010
posts: 8
votes: 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]

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

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 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.
7:49 pm on Mar 7, 2010 (gmt 0)

New User

5+ Year Member

joined:Mar 7, 2010
posts:8
votes: 0


can u please elaborate further ? what and where to edit ?
8:45 pm on Mar 7, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 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!
9:05 pm on Mar 7, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members