[UPHPU] Rewriting Apache URLs
Ray Hunter
bigdog at venticon.com
Mon Aug 7 08:49:05 MDT 2006
Smith, Jeff wrote:
> I have noticed on a couple of sites the URL is something like
> http://www.somesite.com/index.php/2006/08/07/articleName . I know this
> help with SEO, it also makes for a more meaningful URL compared to my
> current method of index.php?articleID=143. I know this isn't strictly
> PHP related but if anyone will know you guys will. How can I get apache
> to accept this as a URL and PHP to properly interpret it?
You can set this up as url rewriting in apache and have it rewrite the
url to your old url style. If you google "apache url rewriting" you will
get tons of information on it.
If i were to do it i would look at using the urls that you see above as
the links that my application creates. Then i would have url rewrite set
up for the index.php page and then have those links rewritten to your
standard way of how php does handles those pages.
here are some standard links for apache 2.0:
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
http://httpd.apache.org/docs/2.0/rewrite/rewrite_guide.html
http://httpd.apache.org/docs/2.0/rewrite/rewrite_guide_advanced.html
One suggest i would give is to be conservative in your efforts and don't
try to use mod_rewrite for everything. it is an expensive process.
--
ray
More information about the UPHPU
mailing list