DeveloperSide.NET Forums
January 24, 2020, 07:38:38 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: .htaccess Files  (Read 30944 times)
0 Members and 1 Guest are viewing this topic.
pichan916
Member
*
Posts: 4


View Profile
« Reply #15 on: April 05, 2005, 04:19:36 PM »

nevermind, i found the script code for it.
Logged
lincspoacher
Member
*
Posts: 21


View Profile WWW
« Reply #16 on: November 21, 2005, 04:34:53 PM »

I have cleared out an earlier version of the devside package, and loaded the latest self-extracting version.  It recognises .php files fine - but does not show php includes - in IE6 or Firefox.

.htaccess file has this line:

Code:
AddType application/x-httpd-php .html .htm


the web files are in folder www/myweb

httpd.conf changes:
Code:
DocumentRoot "/www/webroot/myweb"

<Directory "/www/webroot/myweb">


Full block of code reads:
Code:

<Directory "/www/webroot/myweb">
    Order allow,deny
    Allow from all
</Directory>


<IfModule mod_auth.c>
    <Files ~ "^\.ht">
        Order allow,deny
        Deny from all
    </Files>

    Alias /private "/www/private"

    <Directory "/www/private">
        <IfModule mod_autoindex.c>
            Options Indexes
        </IfModule>

        Order allow,deny
        Allow from all

        AuthType Basic
        AuthName "Private Access"
        AuthUserFile "/www/private/.htpasswd"
        require valid-user
    </Directory>


php .ini

Code:
doc_root = C:/www/webroot/myweb


Is there anything else I have to look at?

The server is used on my Windows Xp Home SP2 laptop for web-development purposes only.
Logged
lincspoacher
Member
*
Posts: 21


View Profile WWW
« Reply #17 on: November 21, 2005, 08:17:00 PM »

OK, I solved the problem for my purposes by adding
Code:
AddType application/x-httpd-php .php .html .htm

to the httpd.conf file.

Since this will work with my web under development, and I know the .htaccess file hacks it on the domain server, that'll do me.
Logged
Jorge
Customer, Basic Support
Guru
*****
Posts: 544

jorge_schrauwen@msn.com
View Profile WWW
« Reply #18 on: November 22, 2005, 02:52:10 PM »

Quote from: "lincspoacher"
OK, I solved the problem for my purposes by adding
Code:
AddType application/x-httpd-php .php .html .htm

to the httpd.conf file.

Since this will work with my web under development, and I know the .htaccess file hacks it on the domain server, that'll do me.


.html and .htm files should never be passed through php...

.php files (optionaly .phps, .phtml, .php3) schould be passed to php.

If your using php code in a htm(l) you should consider renaming the file!

passing all .htm(l) files will give a considerable slow down of the webserver.
Logged

lincspoacher
Member
*
Posts: 21


View Profile WWW
« Reply #19 on: November 22, 2005, 09:10:49 PM »

I am doing that for all new files - but for existing ones I don't want to loose the .htm file extensions because of search engines - and bookmarks.  Almost every .htm  file now has php includes - which makes updating navbars and so forth very easy.

I haven't seen perceptible delays, on the active site's host server, caused by it.
Logged
Jorge
Customer, Basic Support
Guru
*****
Posts: 544

jorge_schrauwen@msn.com
View Profile WWW
« Reply #20 on: November 23, 2005, 10:41:12 AM »

You could use rewrite to redirect the .htm files to there php counterparts.
Logged

Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!