You are here: Re: Search engine friendly URLs « PHP Programming Language « IT news, forums, messages
Re: Search engine friendly URLs

Posted by Geoff Berrow on 11/27/06 19:31

Message-ID: <1164641549.685550.284440@h54g2000cwb.googlegroups.com> from
jopperdepopper contained the following:

>You may want to check out this article as well:
>
>http://www.alistapart.com/articles/succeed/
>
>good luck!

Thanks for that. I've now managed to get the first method I posted to
work (It didn't due to my stupidity in reading the instructions...) It
feels like an instinctively better way of doing it. Instead of passing
everything that is not a file to a script (or in your example passing
everything to a script) the ForceType method is specifically targeted.

The method is this: a php file is saved /without an extension/. Let's
say the file is called articles. The following is placed in .htaccess

<Files article>
ForceType application/x-httpd-php
</Files>

This causes Apache to treat our extensionless file as a php file. The
URL produced just looks like a series of directories e.g.
/article/news/local

Obviously the directories do not exist.
Apache has the feature of looking back up the URL till it comes to
something it recognises - in this case our file article. article
contains code to extract the variables from $_SERVER['REQUEST_URI']

http://www.ckdog.co.uk/article/news/local
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация