Jump to content

Recommended Posts

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,

Link to comment
https://forums.phpfreaks.com/topic/238943-htaccess-indexhtml-no-web-page/
Share on other sites

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

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.