RE: 404 Not Found -> refresh to directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



An interesting idea. I'll work on this next week and see how it goes. Can I ask: why two versions of $uriparams?

Terry

-----Original Message-----
From: Andras Kende <andras@xxxxxxxxx>
Sent: Jul 14, 2005 9:53 PM
To: 'Terry Romine' <terry_romine@xxxxxxxxxxxxx>, 
	'php' <php-general@xxxxxxxxxxxxx>
Subject: RE:  404 Not Found -> refresh to directory


.htaccess:
RewriteEngine on
RewriteRule ^([\w-]+)$ index.php/$1

index.php:
<?php
$uriparams = explode("/",$REQUEST_URI);
$uriparams = explode("?",$REQUEST_URI);
$agent = $uriparams[0];
$agent = eregi_replace("/","",$agent);

// Select from mysql where agent = agent       etc.. etc..

echo ("Location: agent_profile.php?agent=".$agent); 
?>



Best regards,

Andras Kende
http://www.kende.com

-- 
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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux