apache

How to make a local domain alias

Tagged:  

Add in httpd.conf:

<VirtualHost 127.0.0.1>
   ServerName mysitename.local
   DocumentRoot E:\path\to\files
</VirtualHost>

Add in C:\WINDOWS\system32\drivers\etc\hosts :

127.0.0.1 mysitename.local

 

Restart Apache.

Now if you write mysitename.local in firefox it will take you to whatever is in E:\path\to\files.

 

Later edit:
You may also have to:
uncomment LoadModule rewrite_module modules/mod_rewrite.so
put in this line: NameVirtualHost 127.0.0.1

How to make php parse other pages then .php

Tagged:  

How to make php parse other pages then .php?
How to put php code in a .htm page?
How to run php in a html page?

For example, you want to put php code in a .html page and you want it to work. You can do that. You need to put "addtype application/x-httpd-php .html .php .htm" in .htaccess.

Syndicate content