Re: [PHP] Search Engine Friendly URLs

2005-01-16 Thread Greg Donald
On Fri, 14 Jan 2005 13:46:54 -0500, Josh
[EMAIL PROTECTED] 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/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Search Engine Friendly URLs

2005-01-15 Thread Josh
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?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Search Engine Friendly URLs

2005-01-15 Thread Robby Russell
On Fri, 2005-01-14 at 13:46 -0500, Josh 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?


You need to create the file in the root directory of your website.

Example:

if your website is located in
  /home/web/foo/public_html/

then you need to create the file:
  /home/web/foo/public_html/.htaccess

You also need to make some adjustments to Apache to allow you to do
this.

-Robby

-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting  Development
*--- Now supporting PHP5 ---
/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] search engine friendly urls

2002-03-21 Thread Kelly Meeks

Does anyone have any ideas/info (or can you point me to) regarding how to make dynamic 
php content more search engine friendly (losing the '?' when dealing with url 
variables)?

As a Cold Fusion convert, you could do something like this:

http://www.blabla.com/dynamicpage.cfm/205  were 205 would be a record number and would 
be conventionally represented as

http://www.blabla.com/dynamicpage.cfm?id=205  

Thanks in advance,

Kelly

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] search engine friendly urls

2002-03-21 Thread Rasmus Lerdorf

You can do exactly the same thing with PHP.  The 205 would show up in the
$PATH_INFO variable.

-Rasmus

On Thu, 21 Mar 2002, Kelly Meeks wrote:

 Does anyone have any ideas/info (or can you point me to) regarding how to make 
dynamic php content more search engine friendly (losing the '?' when dealing with url 
variables)?

 As a Cold Fusion convert, you could do something like this:

 http://www.blabla.com/dynamicpage.cfm/205  were 205 would be a record number and 
would be conventionally represented as

 http://www.blabla.com/dynamicpage.cfm?id=205

 Thanks in advance,

 Kelly

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Search Engine friendly URLs (/ instead of ? or ) not working in CGI mode

2001-09-13 Thread Jobarr

Hello, I am running windows 2000, apache 1.3.20, and php 4.0.6. I am trying
to set it up so that I could access my webpage as
http://www.site.com/script/1/2 as opposed to
http://www.site.com/script.php?var1=1var2=2. I am using a method similar to
the one descriped here:
http://www.evolt.org/article/Search_Engine_Friendly_URLs_with_PHP_and_Apache
/17/15049/index.html.

For some reason, if I use PHP as a CGI and access any script with a /
after it (http://www.site.com/script.php/) it causes a 500 error and this
message in the error log: Premature end of script headers: c:/php/php.exe.

If I access the same URL using PHP as an apache module, I have no problems.
But, there seems to be some memory leaks in the module so I want to to use
the CGI instead.

Does anyone know why it won't work in CGI mode or maybe what I am doing
wrong?

This is my config for the CGI mode:
ScriptAlias /php/ C:/php/
AddType application/x-httpd-php .php
Action application/x-httpd-php /php/php.exe


Thanks!
-Jobarr





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]