Page 1 of 1

.htaccess

Posted: 2004-06-24 17:39
by highquality
Hallo,

was genau muss in der .htaccess drin stehen das meine index.html php-Code parsen kann? Ich habe schon alles möglich auspropiert.

in meiner index.html steht folgendes:

<?php
... php-code ....
?>
<html>
<head>
<title>--->>>></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script LANGUAGE="JavaScript">
top.location.href='http://www.domain.de
</script>

</head>

<body>
TEST
<SCRIPT LANGUAGE="JavaScript1.2" TYPE="Text/Javascript">
... javascript

</SCRIPT>
</body>

Versucht habe ich folgendes:

AddType application/x-httpd-php php php4 php3 html htm

Da dachte ich, es geht ohne Probleme, nur die eigendliche Seite wird nicht angezeigt bzw. es wird nicht auf die eigentliche Website weitergeleitet.

Bei einem anderen Versuch wurde ich aufgefordert die Website local zu speichern... ;(

Kann mir jemand weiterhelfen?

Gruß hQ
</html>

Re: .htaccess

Posted: 2004-06-24 23:41
by r00ty
probier mal

Code: Select all

AddType application/x-httpd-php .htm
AddType application/x-httpd-php .html
AddHandler x-httpd-php .htm
AddHandler x-httpd-php .html

Re: .htaccess

Posted: 2004-06-25 10:49
by highquality
Hi,

ich habe jetzt in meiner .htaccess folgendes stehen:

AddType x-mapp-php4 .htm
AddType x-mapp-php4 .html

in meiner index.html steht folgendes:

<?php


$absolutepath = "/home/htdocs/web10002/html/statistik";

include($absolutepath."/logit.php");

include($absolutepath."/trackit.php");

include($absolutepath."/datatransfer.php");

include($absolutepath."/includes/useronline.inc.php");

$bstatfilename = trim(ereg_replace ("\\","/",__FILE__));



logit("www.webxxxx.de", "2126339296"); // save visitor

trackit("www.webxxxx.de", "2126339296"); // save visitor movement

usercount("www.webxxxx.de", "2126339296"); // save useronline-number

savefilesize("www.webxxxx.de", "2126339296", $bstatfilename); // save filesize



?>
<html>
<head>
<title>webspacekeeper.de</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" onLoad="MM_goToURL('parent','http://www.webxxxx.de');return document.MM_returnValue">
Du wirst gleich weitergeleitet, sollte Ihr Browser dies nicht unterstützen,
einfach <a href="http://www.webxxxx.de">hier klicken</a>


<SCRIPT LANGUAGE="JavaScript1.2" TYPE="Text/Javascript">
<!--
var sitename = "www.webxxxx.de";
var installdir = "http://logfiles.webxxx.de";
document.write('<SCRIPT LANGUAGE="JavaScript1.2" TYPE="Text/Javascript" SRC="' + installdir + '/scripts/logitjavascript.js?sitename=' + sitename + '&installdir=' + installdir + '&dummy=' + (new Date()).getTime() + '"></SCRIPT>')
//-->
</SCRIPT>



</body>
</html>


das ergebnis ist das jetzt die weiterleitung nicht funktioniert weil aufeinmal im quelltext nur noch das steht:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD>
<BODY></BODY></HTML>

Ja, wo ist den mein Code?

Gruß Stefan

Re: .htaccess

Posted: 2004-06-25 13:21
by simcen
RewriteEngine ON
RewriteRule ^index.html$ index.php [QSA,L]

Das in die .htaccess Datei.

Re: .htaccess

Posted: 2004-06-25 13:50
by highquality
... hatte leider auch keine auswirkung .... ich verstehe das ganze nicht!

Re: .htaccess

Posted: 2004-06-25 23:07
by r00ty
bist du dir sicher dass es
x-mapp-php4
ist ?
poste am besten mal deine httpd.conf (aber bitte ohne Kommentare)

Re: .htaccess

Posted: 2004-07-16 08:52
by cweckmann
Ã?m... muss nicht, damit der PHP-Parser drüber geht die datei index.php anstatt indes.html heißen? :?

Re: .htaccess

Posted: 2004-07-16 14:43
by ryukia
Hi,

Probiers mal wie hier beschrieben: http://www.desilva.biz/php/phpinhtml.html

also

Code: Select all

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
in die .htaccess

Ciao
Ryukia