You are here: Re: [PHP] Search Engine Friendly URLs « PHP « IT news, forums, messages
Re: [PHP] Search Engine Friendly URLs

Posted by Greg Donald on 01/15/05 20:01

On Fri, 14 Jan 2005 13:46:54 -0500, Josh
<joshsbh@thesouthbeachhostel.com> wrote:
> I am converting a site to use includes instead of a Dreamweaver template. I
> want the URLs to look like this: www.my-site1234.com/contact instead of
> www.my-site1234.com/default.php?p=contact.
>
> I found some tutorials on editing the .htaccess file but where do I find it
> on the server?

The .htaccess file is created in the web directory where your .php
files are. It affects all directories from there down.


Looks like you may want something like this:

RewriteEngine on
RewriteRule ^([A-Za-z].*) default.php?p=$1 [L,qsappend]


You might also want

RewriteRule ^$ default.php?p=index [L,qsappend]

for a catch-all bounce to the homepage.


http://httpd.apache.org/docs/mod/mod_rewrite.html


--
Greg Donald
Zend Certified Engineer
http://destiney.com/

 

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

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