Jump to content

VirtualHost and .htaccess


sanjeevdivekar

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
Link to comment
https://forums.phpfreaks.com/topic/20608-virtualhost-and-htaccess/
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?

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.
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.

Archived

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

×
×
  • Create New...

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.