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

From: Date: Tue, 21 Nov 2006 18:59:27 +0000
Subject: Re: How to work with virtual (seo) URLs?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-244979@lists.php.net to get a copy of this message
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

« previous php.general (#244979) next »