Jump to content

Archived

This topic is now archived and is closed to further replies.

sanjeevdivekar

VirtualHost and .htaccess

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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. Authetication

I don't have client's server access where i can't modify httpd.conf file

When i run my script browser shows PHP source.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.