Forum Moderators: phranque

Message Too Old, No Replies

Dynamic sub directories

         

ag_47

2:39 am on Jul 18, 2008 (gmt 0)

10+ Year Member



Hi,

I have notice a couple of times, in some websites when I run a search query, instead of the parameters being sent as variables (i.e. /search.php?q=MySearchQuery ) they are represented as sub directories (i.e. /search/my-search-query/ ).
Am I missing something? Are these sub-directories somehow controlled by PHP or htaccess? Are they 'virtual'? Just something that made me wonder.

I'm not sure if this is PHP related, so please re-direct as needed.

ag_47

4:05 am on Jul 18, 2008 (gmt 0)

10+ Year Member



It's funny how as soon as I post a new topic I end up finding what I was looking for. In any case, to answer my own question, mod_rewrite.
Are there any good tutorials someone can suggest?

jdMorgan

4:19 am on Jul 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



These sites are using "static URLs" -- or more accurately "static-looking URLs" so as to avoid the limitations of search engines' indexing of dynamic URL parameters (search engines must limit the number of query string parameters they crawl, in order to avoid being caught in potentially-infinite URL-spaces). Therefore, there is a significant "SEO benefit" to using this approach.

Check out our Apache forum library, and try a search on WebmasterWorld for "static dynamic URL rewriterule" and similar (links to both are at the top left of this page). There's also this thread, Changing Dynamic URLs to Static URLs [webmasterworld.com] , which covers the subject. Links to fundamental reference material are available in our Apache Forum Charter.

Jim