Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
in Q2A Core by

Google webmaster tools increasing in errors. When I click the error reported I have found that:




There are lots of errors.

moved by

This is my .htaccess


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 mod_headers.c>
  <FilesMatch ".(js|css|xml|gz|html)$">
    Header append Vary: Accept-Encoding
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} libwww-perl.* 
RewriteRule .* – [F,L]
#RewriteBase /
RewriteCond %{HTTP_HOST} ^([a-z.]+)?sitename\.com$ [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .? http://www.%1sitename.com%{REQUEST_URI} [R=301,L]
Do those URLs actually appear on your site?
No I don`t use this option: /index.php?qa=123&qa_1=why-do-birds-sing
I use this URL structure: /123/why-do-birds-sing (requires htaccess file)

1 Answer

+1 vote
It may be due to your second block of rules that's doing the 301 redirect. Google is getting those URLs from somewhere, they must be linked or redirected from somewhere.

Edit: I checked the site in your profile and I see the issue. The www site works fine: http://www.cavabtap.com/500/qiz-sekilleri

But if you try without the www it does a redirect to the error URLs you are getting: http://cavabtap.com/500/qiz-sekilleri goes to http://www.cavabtap.com/index.php?qa-rewrite=500/qiz-sekilleri
Oh yes I did not know that. Thank you very much. I add code my .htaccess for URL Canonicalization. If I write my .htaccess code here could help me to find error?
I have the exact same problem. http://www.question2answer.org/qa/51257/strange-bahevior-when-rewrite

Could you please share your htaccess solution?

Welcome to the Q&A site for Question2Answer.

If you have a question about Q2A, please ask here, in English.

To report a bug, please create a new issue on Github or ask a question here with the bug tag.

If you just want to try Q2A, please use the demo site.