Jump to content

VirtualHost and .htaccess


sanjeevdivekar

Recommended Posts

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

Link to comment
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.
Link to comment
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.

Link to comment
Share on other sites

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.