Hello,
I’ve already talked to my webhost, but they don’t seem to know the least about htaccess files and I am fairly inexperienced. Anyway, my host says there’s a misconfiguration in my htaccess file, so it doesn’t work. Could anyone have a look at my code and point out what I’m doing wrong?
<Files .htaccess>
order allow,deny
deny from all
</Files>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_value docref_root 0
php_value docref_ext 0
Options -Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
ErrorDocument 400 /system/error.php
ErrorDocument 401 /system/error.php
ErrorDocument 403 /system/error.php
ErrorDocument 404 /system/error.php
ErrorDocument 405 /system/error.php
ErrorDocument 500 /system/error.php
ErrorDocument 501 /system/error.php
ErrorDocument 502 /system/error.php
ErrorDocument 503 /system/error.php
RewriteRule ^/?$ index.php?s=info&p=1
RewriteRule ^info/?$ index.php?s=info&p=1
RewriteRule ^more/?$ index.php?s=more&p=1
I’ve always used htaccess to send [noparse]http://www.domainname.com/[/noparse] to [noparse]http://domainname.com[/noparse] and on every host this works perfectly, but on this host it doesn’t work at all. My hosts reply was to set this up via the Plesk control panel, their solution was to add a domain alias. So my site works fine now but I dislike their solution, so I hope I’m doing something wrong…
Also one more question, could be related to this problem. I have a [noparse]www.host.com/index.php[/noparse] page and on that page is the following mysql code: mysql_query(“UPDATE sys SET y = y + 1 WHERE x = ‘total’”); , to check my visitor rate. When someone visits the page I get not oldvalue + 1 but oldvalue + 2. It would seem like the page gets loaded twice?
Thank you very much in advance