Jump to content

.httaccess - do you need one?


Recommended Posts

I've seen hackers edit .htaccess files to create rewrite rules and redirect to their site, but never have I seen an .htaccess file be the SOURCE of the intrusion..

.htaccess files serve their purpose and I wouldn't recommend you remove them... In fact, I'd recommend you put them in certain directories to keep certain file types from being executed..

You should be aware of what's in your .htaccess files... If one has been rewritten by a hacker, you should delete that one and replace it with a clean one...

Link to comment
Share on other sites

I've seen hackers edit .htaccess files to create rewrite rules and redirect to their site, but never have I seen an .htaccess file be the SOURCE of the intrusion..

.htaccess files serve their purpose and I wouldn't recommend you remove them... In fact, I'd recommend you put them in certain directories to keep certain file types from being executed..

You should be aware of what's in your .htaccess files... If one has been rewritten by a hacker, you should delete that one and replace it with a clean one...

what's good content to place into that file?

Link to comment
Share on other sites

ACP > Security Center. PHP / CGI .htaccess protection... Run it..

.htaccess in your forum root... the mod_rewrite IPS gives you in the system settings to remove the index.php...

ACP > Security Center. IP.Board ACP .htaccess protection... Creates a secondary username and password to access the /admin directory... Make it whatever you want (does NOT have to be a valid IP.Board login)

Link to comment
Share on other sites

ACP > Security Center. PHP / CGI .htaccess protection... Run it..

.htaccess in your forum root... the mod_rewrite IPS gives you in the system settings to remove the index.php...

ACP > Security Center. IP.Board ACP .htaccess protection... Creates a secondary username and password to access the /admin directory... Make it whatever you want (does NOT have to be a valid IP.Board login)

Got it and I will do these steps now. What information should be in that .htaccess file? Right now, it shows the below:

# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php

Thanks for the help! :)

Link to comment
Share on other sites

You sure that's the only thing in it? Make sure you've scrolled all the way to the bottom of the file and make sure it's just those 2 lines...

Those 2 lines are fine.

You'd add the IP.Board mod_rewrite... It depends on where your board is installed on what it would be...


ACP > System Settings > Search Engine Optimization.. It will tell you what to put in there...

Link to comment
Share on other sites

If you have Friendly URLs turned on in your conf_global.php file..

Set the top one and the third one to YES and put the <ifModule mod_rewrite.c> and the rest of the text there in your .htaccess file that's in your forums root directory..

If your board is installed in root, it will just be /index.php [L]

If it's installed in /forums it would be /forums/index.php[L] That's the only reason I suggested you check your forum..

Link to comment
Share on other sites

I've tried this on a few sites, however, it produces a 500 server error.

Forum is the root

Config. file set to:

$INFO['use_friendly_urls'] = '1';

htaccess file set to:

# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .(jpeg|jpg|gif|png)$ /public/404.php [NC,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...