Good mod_rewrite url

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
psurrena
Forum Contributor
Posts: 355
Joined: Thu Nov 10, 2005 12:31 pm
Location: Broolyn, NY

Good mod_rewrite url

Post by psurrena »

Is this style of url good for search engines?

Code: Select all

http://www.enumerated.org/The-Greatest-book-in-the-world/13
The mod_rewrite is

Code: Select all

RewriteEngine On
RewriteRule ^([^/]+)/([^/]+)$ /view.php?title=$1&id=$2 [L]
After the title is pulled for the article, I run this before the link

Code: Select all

$title = str_replace(' ', '-', $title);
Is this a good system?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

Yes, long, spelled-out URLs with dashes or underscores are good for many search engines, especially those like Google that don't do much with meta tags.
(#10850)
User avatar
psurrena
Forum Contributor
Posts: 355
Joined: Thu Nov 10, 2005 12:31 pm
Location: Broolyn, NY

Post by psurrena »

Within reason, can there be too many words? In other words, does google stop reading after a certain length?
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

psurrena wrote:Within reason, can there be too many words? In other words, does google stop reading after a certain length?
put whatever is appropriate to your content - if you start messing about to influence google, you will likely only drop your pagerank.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

psurrena wrote:Within reason, can there be too many words? In other words, does google stop reading after a certain length?
yay google 8)

http://www.boutell.com/newfaq/misc/urllength.html
Post Reply