|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dynamic URL-based scripting
Ever used LiveJournal or Wikipedia? http://livejournal.com/ returns the main site; http://livejournal.com/user/username returns the main page for user username; http://livejournal.com/user/username/calendar/2004/01/23 returns all entries from January 23 for user username.
Obviously it's impractical create a directory for every day of the year for every user and so on, so I'm guessing they somehow pass the url to a script (LiveJournal uses Perl; Wikipedia uses PHP), which parses the URL in variables and formats the appropriate page, etc. My question is how does one set it up to perform this way? Of course it's possible to set up as http://livejournal.com/index.pl?page=calendar&month=01&day=23, but it's rather ugly (not to mention confusing for many users). Is it something where I have to edit my actual server configuration or there a script that handles this? I apologize about the length intro; just trying the explain what the heck I'm talking about. |
|
#2
|
|||
|
|||
|
Actually, they are probably using Apache's mod_rewrite, not the server-side language to do that.
Common HTTP Implementation Problems Search Engine Friendly URLs with mod_rewrite URL Rewriting Guide - Apache HTTP Server URLS! URLS! URLS!: A List Apart fluidthoughts: howto - mod_rewrite Module Rewrite - URL Rewriting guide. mod-rewrite.com |
|
#3
|
||||
|
||||
|
It's a great question, and Kravvitz has hit the answer, mod_rewrite.
It's worth noting that these friendly URLs are indexable by search engines. Many search engines won't keep a page with a query string, but if they think it's the directory structure they'll index it. Here's some examples. http://www.example.com/petstore/canine/bulldogs If you search for "Bulldogs", this address (I believe) is ranked higher because the search term is in the actual URL. http://www.example.com/petstore.htm?category=canine&type=bulldogs The actual URL to this page is everything before the question mark. Many search engines will simply ignore the rest. Just some more benefits of these friendly URLs. There's an article on Devarticles about Make Dynamic URLs Search Engine Friendly I ask that any Search Engine Optimization Expert please correct me.
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter! DevArticles Forum Moderator "The net is a waste of time, and that's exactly what's right about it." -- William Gibson |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Web Development > Dynamic URL-based scripting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|