Here’s simplified .htaccess file:
RewriteEngine On
RewriteRule ^index$ index.php
On my local lamp server everything works fine, but there are some problems on production server. myurl/index returns only blank screen, php is not parsed. When required file is accessed directly (myurl/index.php) it works fine.
I noticed that this problem occurs only if in the required file the wordpress header is included (wp/wp-blog-header.php). After some more research I found out that blank screen is returned when wp() runs. Error reporting is enabled for wordpress and there are no entries in log files.
Does anybody have any idea why that happens?
Thank you, Josh, for useful script.
I found the solution. I don’t know why, but the content was buffered if rewritten url was used.
in the beginning of the file helped.
I know you said that error reporting is enabled but I figured I’d ask: how is it enabled? 99% of the times I’ve seen what you describe it’s because error reporting is disabled.
Here’s a quick test to see if it is a PHP error. The following code will email you when a PHP error occurs. What I often do is place this into a file called “errorhandler.php” and include() that file in other PHP files to enable this error handler. You’ll need to tweak it to your scenario… E.G. change “YOURDOMAIN” and “YOUREMAIL” 🙂