You are here: Getting php to work from the root « PHP Programming Language « IT news, forums, messages
Getting php to work from the root

Posted by fletch on 10/10/06 09:07

Hi all.

I am rerouting all requests through a script, dispatch.php, using a
..htaccess file, except on a few directories. dispatch.php then decides
what code needs to be loaded to return the correct info.

When calling the site root http://primo.localhost/ the result is sent
as text/plain and is rendered as such by Firefox (though interestingly
not IE, which renders the html)

When calling the page http://primo.localhost/index I get the exact same
content, but Firefox renders html, not text.

Has anyone got any explanation for this behaviour? Or a way to fix it?
I do not make any calls to header() in my code.

..htaccess:-
php_value include_path
".:/home/sites/primo.localhost/web/:/home/sites/primo.localhost/primo/:/home/sites/primo.localhost/"
RewriteEngine on
RewriteCond $3 (.*$)
RewriteCond $2 !zc
RewriteCond $2 !rt
RewriteCond $2 !html_version
RewriteCond $2 !rt
RewriteCond $2 !primo
RewriteCond $3 !dispatch.php
RewriteRule ((.*)/)?([^/]*)$ /dispatch.php

php_value error_reporting 2047
php_value display_errors on


cheers
fletch

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация