Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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