Re: How to work with virtual (seo) URLs?

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

 



Hello Erik,

I just realized that I oversaw some things. Here they are:

Am Sonntag, 19. November 2006 00:05 schrieb Erik Gyepes:
> #check if file or directory real exists:
is_dir()
file_exists()

> #do the rule only if the address has no extension:
pathinfo()


> #replace /whatever to /whatever/, not apply to whatever/!
preg_replace()
regex: "/[^/]$/"

> #do the rule only if the address ends with trailing slash:
preg_match()
regex: "/\/$/"

> #if the rule ends with trailing slash then redirect to index.php..
s.o.
header("Location: http://path/to/index.php\r\n";);

Regards,

Oliver

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