ali_kiyani Posted December 12, 2010 Share Posted December 12, 2010 Hi, I have the following file structure /.htaccess /index.php /displaypage.php All files are on root. I have following written in .htaccess file Options FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-z0-9-]+)$ displaypage.php?page=$1 [NC,L] I have following written in displaypage.php echo $_GET["page"]; Now when I run http://localhost/ then it shows index.php page which is correct. If I run http://localhost/something then it shows a blank page. Previously it used to display that "page" variable on screen. mod_rewrite is enabled and I am using Windows with XAMPP. What am I doing wrong? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/221385-htaccess-not-working-previously-it-was-working/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 12, 2010 Share Posted December 12, 2010 Blank php pages are usually the result of a fatal php parse error on the page. Have you tested displaypage.php by browsing directly to it and do you have error_reporting set to E_ALL and display_errors set to ON in your master php.ini so that all php detected errors will be reported and displayed? Quote Link to comment https://forums.phpfreaks.com/topic/221385-htaccess-not-working-previously-it-was-working/#findComment-1146106 Share on other sites More sharing options...
ali_kiyani Posted December 12, 2010 Author Share Posted December 12, 2010 Have you tested displaypage.php by browsing directly to it This did the trick. I browsed it directly and it was same blank page. Went to code and saw that I am missing "php" between these <?php echo....?> Problem solved. Many thanks! Quote Link to comment https://forums.phpfreaks.com/topic/221385-htaccess-not-working-previously-it-was-working/#findComment-1146115 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.