hi, recently i was able to disable PHP in some folders by adding below lines in httpd.conf file <Directory "/var/www/html/wap/xhtml"> php_admin_flag engine off </Directory> now i'm facing new problem. when i access .xhtml files in the PHP disabled folders, instead of loading those page, it downloads the page so in some browsers i get the error as cannot download this file what can i do to avoid this and enable xhtml in those folders pls help
Um why do you use a xhtml extension? Just rename to .html and use the correct doctype to ensure the page is interpreted as xhtml. This has nothing to do with your .htaccess
yes ,i found that once rename those files to .html it works. i have written many pages with .xhtml extension so it will take long time to change those files and links within those files to html. that's why i need a solution to execute .xhtml files
can you give me a way to find out whether my .htaccess are working fine? I'm not sure whether .htaccess is working or not in my server (how to enable)
Um yeah, if your PHP isn't working in the directories you specified then it's working fine.. Have you added the line I told you yet?
yes but still no luck.here is what i have done, created a .htaccess file in the PHP disabled folder and add the below given line in that folder. AddType application/xhtml+xml .xhtml then after, i restarted the Apache and try those xhtml files in the PHP disabled folder on browser. but still what happen is save the xhtml file to my local machine and then open the saved file in the browser
Well, if htaccess is disabled you could add that line to your httpd.conf as well.. right where you have the disable php line
there is a luck with what you have suggested and now i can load the xhtml files. but now it checks for errors in the coding and display only part of the page. if i save the same file as a .html file then no issue.