Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ideal .htaccess file for GS. Help please
#4
A .htaccess file, much like marrco’s, has actually been discussed by me and Chris over at the GetSimple Issue Tracker.

As for your HTACCESS:
Code:
<files gsconfig.php>
order allow,deny
deny from all
</files>
This is a little unneeded. The file itself will not run if a browser is pointed at it and will display a message by itself. But of course if you don’t want to allow access to it at all, use this.
Code:
#who has access who doesnt
order allow,deny
#deny from 000.000.000.000
allow from all
Unless you’re going to put in some “deny from …” lines you might as well remove this.
Code:
#custom error docs
ErrorDocument 404 /notfound.php
ErrorDocument 403 /forbidden.php
ErrorDocument 500 /error.php
I believe 404 errors are already handled by GetSimple. A clean GetSimple installation wont include any notfound.php, forbidden.php and error.php files so that might break your server. (404 error -> notfound.php -> 404 error -> …) If you have created those files, it’s OK.
Code:
#block referring domains
RewriteEngine on
RewriteCond %{HTTP_REFERER} digg\.com [NC]
RewriteRule .* – [F]
You don’t want people to be able to visit you when they clicked a link on digg.com?
Code:
# protect from spam comments
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
#RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*MYWEBSITE.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
Can be removed as there is no “wp-comments-post.php” file to protect.

It is very clear that this .htaccess file is aimed at WordPress and it really features very little you’d normally need.

Another note is redundency. You only have to state “RewriteEngine On” once on top of the file if you plan to use it. Besides, the .htaccess file supplied with GetSimple already turns it on.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply


Messages In This Thread
Ideal .htaccess file for GS. Help please - by Zegnåt - 2010-09-24, 23:57:05



Users browsing this thread: 1 Guest(s)