Re: Search Engine Friendly URLs

From: Date: Sat, 15 Jan 2005 18:01:12 +0000
Subject: Re: Search Engine Friendly URLs
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-206449@lists.php.net to get a copy of this message
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/

« previous php.general (#206449) next »