I'm having a script problem with an upgrade from php4 to php5 and phpsuexec enabled. I have a script "foo" which is executed without the php extension i.e. "foo" resides in the "test" directory i.e. www.domain.com/test inside the "test" directory the htacess file has: <files foo> SetHandler application/x-httpd-php5 </files> or <files foo> ForceType application/x-httpd-php5 </files> which allows "foo" to be executed without the .php extension when it is called by www.domain.com/test/foo With php4, www.domain.com/test/foo/ "trailing slash" would also work. With php5, the addition of the trailing slash does not execute the script. I am thinking this is because "foo" is a virtual directory? The script dynamically creates pages i.e. www.domain.com/test/foo/widget.html etc. If anyone can shed light on why I am having the problem with php5 and not php4? Any suggestions for a solution?
No, I haven't. Do you have an example I could try? Would that go in the root .htaccess or the directory .htaccess? Thank you.
I suspect it doesn't have anything to do with PHP 5 vs PHP 4 at all. Is this a script you wrote, a script you bought or a script someone wrote for you? Have you always used it with urls like: www.domain.com/test/foo/widget.html The classic way to do this is to put the script in a normal php file foo.php and then use mod rewrite to change the url. Something like: RewriteRule foo/(.*).html foo.php?id=$1 [L] I haven't checked the syntax so it may be wrong but that's the general idea.
It is an older script that the original author stop supporting. I've used it for years, and it only breaks with php5. I use seven different hosts and it has broken only with an upgrade to php5. I'm forcing it to use php4, but since php4 is no longer going to be supported, it is due to be completely dropped by hosting companies. The silent rewrite suggested above seems to be working, so this may be a work around. RewriteRule ^(.+)/$ http://www.domain.com/test/foo/$1 [L]