Mr_J Posted June 10, 2011 Share Posted June 10, 2011 Hi all, I was hacked and found after a week that the .htaccess file shows to Scl.html as start page. I have changed it to: Options all DirectoryIndex index.html AddType text/plain .php AddHandler server-parsed .php AddType text/plain .html When I enter the address in my browser, it shows my html code instead of the actual webpage. Any idea how to get it to show my web page? Regards, Quote Link to comment https://forums.phpfreaks.com/topic/238943-htaccess-indexhtml-no-web-page/ Share on other sites More sharing options...
Mr_J Posted June 10, 2011 Author Share Posted June 10, 2011 Hi all, I was hacked and found after a week that the .htaccess file shows to Scl.html as start page. I have changed it to: Options all DirectoryIndex index.html AddType text/plain .php AddHandler server-parsed .php AddType text/plain .html When I enter the address in my browser, it shows my html code instead of the actual webpage. Any idea how to get it to show my web page? Regards, After some Google-ing I found lots of articles. I managed to change my .htaccess file to: Options +ExecCGI -Indexes DirectoryIndex index.php index.html index.htm ### DEFAULTS ### ServerSignature Off AddType video/x-flv .flv AddType application/x-shockwave-flash .swf AddType image/x-icon .ico AddDefaultCharset UTF-8 DefaultLanguage en-US SetEnv TZ SouthAfrica/Klerksdorp SetEnv SERVER_ADMIN jcjbrt@gmail.com ### FAST-CGI ### AddHandler fastcgi-script fcgi AddHandler php-cgi .php Action php-cgi /cgi-bin/php5-wrapper.fcgi # MONTH <FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|swf)$"> Header set Cache-Control "max-age=2592000" </FilesMatch> # WEEK <FilesMatch "\.(js|css|pdf|txt)$"> Header set Cache-Control "max-age=604800" </FilesMatch> # DAY <FilesMatch "\.(html|htm)$"> Header set Cache-Control "max-age=43200" </FilesMatch> Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?pharmacy.za.org/.*$ [NC] Source: http://www.evolt.org/ultimate_htaccess_examples Very interesting for me as webmaster who, by no doubt, need to learn much more than just html/php coding... Cheers Jaco Quote Link to comment https://forums.phpfreaks.com/topic/238943-htaccess-indexhtml-no-web-page/#findComment-1227829 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.