Need help with .htaccess file
-
I am working for a small organization to update their site to a new/fresh WordPress theme. Things are going well, but I do not know that much about .HTACCESS files and theirs seems to have a lot of stuff in it that I don’t know what it does or if it is even still correct or valuable. The site was built using a “custom theme” and is probably over 10 years old, and so I want to get is all streamlined and updated. I know some basic WordPress and CSS, but .HTACCESS is a bit beyond me, although I do know that it helps control the way the Apache server behaves and controls things like directory browsing and redirects.
I want to make sure that this file is clean and nothing old/unnecessary in it, as well as to add in any key security or performance measures that may be missing.
I think some of the stuff in the .HTACCESS file seems ok and appears to be standard .HTACCESS stuff for wordpress sites, but other lines I’m not sure if they should stay in or should come out.
For example, do you need the code about the output compression, and is that only for php4, which probably isn’t even being used by our site anymore?
And some things look like they are already commented out (with the “#” in front of them, so I presume I can just remove them entirely from the file?
And toward the end, it looks like a whole bunch of 301 redirects, but not in a format I am familar with.. and I’m not sure all these domains are even in existence any more by this organization, so can I just remove any lines for domains that don’t exist anymore?
Thanks for the help.
Regards,
Michael
Here is the .HTACCESS file contents below.
——————————————————
# http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# secure htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files># preserve bandwidth for PHP enabled servers
<ifmodule mod_php4.c>
php_value zlib.output_compression 16386
</ifmodule># disable the server signature
ServerSignature Off# set the server timezone
SetEnv TZ America/New_York#asterisk
## disable directory browsing
#Options All -Indexes
#asterisk# prevent folder listing
IndexIgnore .htaccess *.php *.txt# Use PHP5 as default
# Use PHP5 Single php.ini as default
# AddHandler application/x-httpd-php5s .php# php_value session.save_path ‘/tmp’
Options +SymLinksIfOwnerMatch
# For security reasons, Option all cannot be overridden.
#Options All -Indexes
Options ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch -Indexes<files wp-config.php>
Order deny,allow
deny from all
</files>RewriteEngine on
RewriteCond %{HTTP_HOST} ^ioresourcecenter.com [OR]
RewriteCond %{HTTP_HOST} ^www.ioresourcecenter.com$ [OR]
RewriteCond %{HTTP_HOST} ^informationoverloadresourcecenter.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.informationoverloadresourcecenter.com$ [OR]
RewriteCond %{HTTP_HOST} ^informationoverloadresourcecenter.org$ [OR]
RewriteCond %{HTTP_HOST} ^www.informationoverloadresourcecenter.org$ [OR]
RewriteCond %{HTTP_HOST} ^www.informationoverloadresources.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.iorgforum.com$ [OR]
RewriteCond %{HTTP_HOST} ^iorgforum.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.iorgforum.org$
RewriteRule (.*)$ http://iorgforum.org/$1 [R=301,L]
#RewriteRule ^/?$ “http\:\/\/informationoverloadresources\.com” [R=301,L]# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
The topic ‘Need help with .htaccess file’ is closed to new replies.