Friday, January 28, 2011

.htaccess problem not allowing /forum/

I'm having an issue with my .htaccess

/forum/ as seen here: http://www.diablo-source.com/forum/ is not being forwarded to the actual forum directory like it's supposed to.

I don't see any issues with my .htaccess, can anyone see any reason why it wouldn't be working?

RewriteEngine on

RewriteCond    %{REQUEST_URI}  ^[^.]+$
RewriteRule    ^(.+[^/])$           /$1/  [R=301,L]

RewriteCond %{HTTP_HOST} !^www.diablo-source.com$
RewriteRule ^(.*)$ http://www.diablo-source.com/$1 [R=301,L]

#Don't break valid URL's!
RewriteRule ^forum/(.+)$ forum/$1 [L]
RewriteRule ^image/(.+)$ image/$1 [L]
RewriteRule ^feed/(.+)$ feed/$1 [L]
RewriteRule ^cron/(.+)$ cron/$1 [L]
RewriteRule ^lib/(.+)$ lib/$1 [L] [NS]
RewriteRule ^index.php$ index.php?%{QUERY_STRING} [L] [NS]

#But fix the ones that need fixing
RewriteRule ^([^/]+?)/([^/]+?)/([^/]+?)/([^/]+?)/([^/]+?)/([^/]+?)/?$ /index.php?cmd=$1&sec=$2&subsec=$3&tiersec=$4&quadsec=$5&act=$6&%{QUERY_STRING} [L,NS]
RewriteRule ^([^/]+?)/([^/]+?)/([^/]+?)/([^/]+?)/([^/]+?)/?$ /index.php?cmd=$1&sec=$2&subsec=$3&tiersec=$4&act=$5&%{QUERY_STRING} [L,NS]
RewriteRule ^([^/]+?)/([^/]+?)/([^/]+?)/([^/]+?)/?$ /index.php?cmd=$1&sec=$2&subsec=$3&act=$4&%{QUERY_STRING} [L,NS]
RewriteRule ^([^/]+?)/([^/]+?)/([^/]+?)/?$ /index.php?cmd=$1&sec=$2&act=$3&%{QUERY_STRING} [L,NS]
RewriteRule ^([^/]+?)/([^/]+?)/?$ /index.php?cmd=$1&act=$2&%{QUERY_STRING} [L,NS]
RewriteRule ^([^/]+?)/?$ /index.php?cmd=$1&%{QUERY_STRING} [L,NS]

What I really don't get is that this is literally the exact same .htaccess running for: http://www.starcraft-source.com/forum/

There is no difference in the virtual host configuration for these two sites.

update

Anyone have any ideas on how I can debug this?

  • What happens with the other rules on htaccess? Are they working? If the answer is yes then the problem is with the /forum directory, maybe the htacces inside is not working.

    From HD
  • In answer to your question of how to enable the rewrite_log, add the following to your .htaccess:

    RewriteLog [filename]

    Note that if [filename] does not start with a /, then it's location is relative to the server root.

    From KayakJim

0 comments:

Post a Comment