.htaccess tips

I thought I'd start a thread regarding tips on enhancing one's .htaccess file.  Note:  Always backup your .htaccess file before tweaking it, and go to your site to see the effect of each and every change you may make.

Quote · 26 May 2008

Something very strange happened a few days back. I was having problems with my firefox browser frequently crashing, so I installed opera browser on my PC. I opened my cpanel and did some work, then later I found my Dolphin site having many Error 404 pages coming up. I checked with my hosting company and they said my .htaccess files for 3 of my websites (2 based on Dolphin and 1 other based on a proprietary PHP script) had been edited and the "mod rewrite Rewrite Engine on" had been stripped off from the files. From their logs they identified that this had happened at the time that I was doing some work via my cpanel using opera browser.


This is very unexpected and I wonder whether anyone else has had a similar experience. Suffice to say I have removed the opera browser from my PC and have gone back to using Internet Explorer.

Quote · 7 Aug 2008

Opera browser didn't have anything to do with it as the .htaccess file can only be
modified via ftp, shell, or hosting control panel access.

As extra security include below in .htaccess:

<Files .htaccess>

order allow,deny

deny from all

</Files>

Quote · 7 Aug 2008

Hello and thanks very much for the suggestion. You've confirmed what I had been advised to do earlier by my hosting company, Hostgator. In fact the additional code they asked me to insert is shown below. This additional code was already in place much earlier before this recent problem. Here's the code :


Options All

## begin section needed for custom php.ini file


<IfModule mod_suphp.c>
 suPHP_ConfigPath /home/domain/php.ini
 <Files php.ini>
   order allow,deny
   deny from all
 </Files>
</IfModule>

## end section needed for custom php.ini file


And only below that is the standard Dolphin .htaccess code, i.e :


Options -MultiViews

<IfModule mod_rewrite.c>
RewriteEngine on


This is the part of the code that was stripped off somehow. It's all quite mysterious. Anyway as per my normal troubleshooting methods I looked for an answer to the question of "Something has changed that has caused this problem. What is it that has changed?"


And in my case the only thing that I found that had changed was the Opera browser installation in my PC. So I uninstalled it, uploaded my backups of the relevant .htaccess files and thank God everything was working again.


Frankly I'm not really sure, but for the present I'll just let sleeping dogs lie !

Quote · 8 Aug 2008

Hi - I just performed a fresh install and it seems the .htaccess files are not compatible with my version of Apache(2.2.4)

After install I got a 500 internal server error when browsing the site.  Checking my error log showed:

.htaccess: Option MultiViews not allowed here

Commenting out the Option MultiViews seems to resolve but I think maybe causes other problems?  Is this a known issue and is there workaroud?

Thanks

Quote · 11 Sep 2008

Yes, sometimes need to comment this

MultiViews

.. all this is because impossible to create multi-capability htaccess file that was able to work at alls servers in the world :)

just because impossible check this server variables in .htaccess ...

Quote · 12 Sep 2008

options All

## begin section needed for custom php.ini file


<IfModule mod_suphp.c>
suPHP_ConfigPath /home/domain/php.ini
<Files php.ini>
order allow,deny
deny from all
</Files>
</IfModule>

## end section needed for custom php.ini file

And only below that is the standard Dolphin .htaccess code, i.e :

Options -MultiViews

<IfModule mod_rewrite.c>
RewriteEngine on

so where do u add this new code????

Quote · 1 Oct 2008

Hello faceflirt,

The advice I was given by Hostgator is that the .htacces file code ahould begin as follows :

Options All

## begin section needed for custom php.ini file


<IfModule mod_suphp.c>
suPHP_ConfigPath /home/domain/php.ini
<Files php.ini>
order allow,deny
deny from all
</Files>
</IfModule>

## end section needed for custom php.ini file


Options -MultiViews

<IfModule mod_rewrite.c>
RewriteEngine on

Please note that the last 3 lines above are the beginning of the standard .htaccess file which comes with the Dolphin download. This means that the code that I have shown in bold above needs to be added above the first line of the standard .htaccess file.


I'm not an expert in php, but am just repeating here the advice given by the techies in Hostgator. Experts in php and Dolphin may want to verify this.

Thanks/Regards.

Quote · 11 Oct 2008
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.