sanjeevdivekar Posted September 13, 2006 Share Posted September 13, 2006 Hi,I am running Apache 2.0.54 with PHP 4.4.0 on Windows 2003 Box.I have setup VirtualHost which is running fine except .htaccess file within that.The Same thing works fine in htdocs folder (Apache Doc Root).Please Help me I am doing first time PHP.Regards,Sanjeev Divekar Link to comment https://forums.phpfreaks.com/topic/20608-virtualhost-and-htaccess/ Share on other sites More sharing options...
R_P Posted September 13, 2006 Share Posted September 13, 2006 Make sure that your AllowOverride directive contains AuthConfig, especially if your virtual host is using a different <directory>. This is really the only possible cause I can think of - besides the content of your .htaccess files being incorrect. Link to comment https://forums.phpfreaks.com/topic/20608-virtualhost-and-htaccess/#findComment-91162 Share on other sites More sharing options...
sanjeevdivekar Posted September 13, 2006 Author Share Posted September 13, 2006 Thanks for replay.But I doing PHP 1st time so i am not getting what u say. Let me explain what I did.in my .htaccess file there is only one line[quote]DefaultType application/x-httpd-php[/quote]my VirtualHost lines are like this[quote]<VirtualHost 127.0.0.1:8080> DocumentRoot "D:/Websites/mow/site/web" ServerName dev.mow.com ErrorLog logs/dev.mow.com.error.log CustomLog logs/dev.mow.com.access.log combined AccessFileName .htaccess</VirtualHost>[/quote]what should i do? Link to comment https://forums.phpfreaks.com/topic/20608-virtualhost-and-htaccess/#findComment-91173 Share on other sites More sharing options...
R_P Posted September 13, 2006 Share Posted September 13, 2006 What kind of error are you getting, or are you not? Also, why do you need a DefaultType directive in .htaccess anyway? As long as you have configured PHP correctly and added the AddType, php will run anything with a .php (or whatever you chose) extension. Virtual hosts should inherit these configurations by default. Link to comment https://forums.phpfreaks.com/topic/20608-virtualhost-and-htaccess/#findComment-91182 Share on other sites More sharing options...
sanjeevdivekar Posted September 13, 2006 Author Share Posted September 13, 2006 As I said i never used PHP. this is my first experinec.I am developing one small website for my client.there are two points.1. I want to hide .php extension. (I am successful when i run code in htdocs)2. AutheticationI don't have client's server access where i can't modify httpd.conf fileWhen i run my script browser shows PHP source. Link to comment https://forums.phpfreaks.com/topic/20608-virtualhost-and-htaccess/#findComment-91185 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.