Webmastersite.net
Register Log In

access without WWW
Subdirectoy failure

Comments on access without WWW

finsandfur
Forum Regular

Usergroup: Customer
Joined: Apr 18, 2006

Total Topics: 28
Total Comments: 103
Posted Dec 21, 2008 - 10:04 AM:

I think something in my htaccess file, since the last upgrade, is killing access to one of my subdirectories when a user attempts to enter without having WWW in the url. It used to work.

Example url is http://finsandfur.net/forums
It throws an error
Second attempt will go right through

The only way me or my users can access this directory is with the WWW in place; http://www.finsandfur.net/forums
All other subdirectories work with or without the WWW as they should. Example http://finsandfur.net/Top100

I've tried conditions to the htaccess file to over come this but all to no avail.
Any ideas, Paul or anyone, what would cause this?

This is what my current .htaccess contains;

Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ $1/ [R]

RewriteCond %{HTTP_HOST} !^www.[a-z-]+.[a-z]{2,6} [NC]
RewriteCond %{HTTP_HOST} ([a-z-]+.[a-z]{2,6})$ [NC]
RewriteRule ^/(.*)$ http://%1/$1 [R=301,L]

RewriteCond %{REQUEST_URI} ^/(stats/|missing.html|failed_auth.html|error/).* [NC]
RewriteRule .* - [L]

RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]

RewriteRule ^Top100$ Top100/index.php
RewriteRule ^Top100/$ Top100/index.php

RewriteRule ^forums$ forums/index.php
RewriteRule ^forums/$ forums/index.php

RewriteRule ^store$ store/index.php
RewriteRule ^store/$ store/index.php

RewriteRule ^admin/?$ admin/index.php

RewriteRule ^members/([0-9]+).html?$ memberlist.php?rewritten=1&page=$1
RewriteRule ^members/([-_/+A-Za-z0-9]+)-([0-9]+)-trader.html?$ trader.php?rewritten=1&id=$2
RewriteRule ^members/([-_/+A-Za-z0-9]+)-([0-9]+).html?$ memberlist.php?rewritten=1&action=profile&id=$2
RewriteRule ^members/?$ memberlist.php?rewritten=1
RewriteRule ^help/?$ help.php?rewritten=1
RewriteRule ^help/([-_/+A-Za-z0-9]+)/?$ help.php?rewritten=1&action=showcat&name=$1
RewriteRule ^help/([-_/+A-Za-z0-9]+)/([-_/+A-Za-z0-9]+)-([0-9]+).html ?$ help.php?rewritten=1&action=showitem&id=$3


RewriteRule ^tags/([a-zA-Z0-9]+)/?$ search.php?rewritten=1&filled=1&action=filter&whichtype=link s&tagscondition=like&tagssearch=|$1|

RewriteRule ^thread/([0-9]+)/([0-9]+)/?$ comments.php?rewritten=1&id=$1&page=$2
RewriteRule ^thread/([0-9]+)/?$ comments.php?rewritten=1&id=$1
RewriteRule ^links/[-_/+A-Za-z0-9]+-([0-9]+).html?$ link.php?rewritten=1&action=detail&id=$1
RewriteRule ^([0-9]+)/?$ index.php?rewritten=1&action=displaycat&catid=$1
RewriteRul e ^([0-9]+)/([0-9]+)/?$ index.php?rewritten=1&action=displaycat&catid=$1&page=$2
Re writeRule ^([0-9]+)/sp([0-9]+).htm$ index.php?rewritten=1&action=displaycat&catname=$1&subpage=$ 2
RewriteRule ^([-_/+A-Za-z0-9]+)/?$ index.php?rewritten=1&action=displaycat&catname=$1
RewriteR ule ^([-_/+A-Za-z0-9]+)/([0-9]+)/?$ index.php?rewritten=1&action=displaycat&catname=$1&page=$2

order allow,deny
deny from 169.241.61.254
deny from 72.193.37.196
deny from 122.162.60.27
deny from 78.175.133.152
deny from 116.29.34.37
allow from all


finsandfur
Forum Regular

Usergroup: Customer
Joined: Apr 18, 2006

Total Topics: 28
Total Comments: 103
Posted Dec 22, 2008 - 9:59 AM:

Problem solved

/forums/index.php?PHPSESSID=cf2bed1aa6a2c9087c7e75 bf4367a9dd;www;board=6
HTTP/1.0 www.finsandfur.net Access denied with code 500 (phase
2). Match of "rx ^[0-9a-z]*$" against "ARGS:PHPSESSID" required. [file
"/usr/local/apache/conf/modsec2.user.conf"] [line "570"] 500


Turns out to be an error caused by SecRule ARGS:PHPSESSID "!^[0-9a-z]*$"


Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 23, 2008 - 9:17 PM:

You'd probably find it an easier experience to put your SMF in a subdomain instead of a subdirectory... that way you wouldn't have to maintain .htaccess exceptions.
finsandfur
Forum Regular

Usergroup: Customer
Joined: Apr 18, 2006

Total Topics: 28
Total Comments: 103
Posted Dec 24, 2008 - 10:19 PM:

Definitely, I agree.
But there are ups and down to each scenario wink
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.