Hi
In my site I have a main domain contains a q2a and another q2a in a sub-domain
I want to redirect both domain and sub-domain
domain.com >>>> www.domain.com
www.sub.domain.com >>>> sub.domain.com
But the problem is when I open a question page in subdomain it give error that :
======
A Question2Answer database query failed when generating this page.
A full description of the failure is available in the web server's error log file
======
codes in htaccess in main folder :
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]
</IfModule>
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTPS} ^on$
RewriteCond %{HTTP_HOST} ^www\.([^.]+\.[^.]+\.[^.]+)$
RewriteRule ^ https://%1%{REQUEST_URI} [L]
RewriteCond %{HTTPS} !^on$
RewriteCond %{HTTP_HOST} ^www\.([^.]+\.[^.]+\.[^.]+)$
RewriteRule ^ http://%1%{REQUEST_URI} [L]
Codes in sub domain folder :
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]
</IfModule>
Any help ?