Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
465 views
in Q2A Core by

When I enter this website it opens correctly http://www.cavabtap.com/540/samsung-galaxy-s5-qiymeti

But when I enter without www like that http://cavabtap.com/540/samsung-galaxy-s5-qiymeti  the page is not found.

Where is the problem and how can I solve it?

by
Both links work fine for me, the non-www link redirects to the www link. If this is a brand new domain it may have still been building the DNS registry.

1 Answer

+1 vote
by
selected by
 
Best answer

The second link rewrites to: http://www.cavabtap.com/index.php?qa-rewrite=540/samsung-galaxy-s5-qiymeti

Go to >admin >general and make sure that the first option is checked "/123/why-do-birds-sing (requires htaccess file)"

Another suggestion: Open your .htaccess and rewrite all domains to "www" (this is also better for search bots like google). The beginning of my htaccess looks like that, modified to your domain:

DirectoryIndex index.php

<IfModule mod_rewrite.c>
RewriteEngine On

# Rewrite all domains to one domain
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.cavabtap\.com [NC]
RewriteRule (.*) http://www.cavabtap.com/$1 [R=301,L]

# Rewrite for neat URLs
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>

 

by
Wooooow Mister you are great very great :) Thank you very much. I just add this code and it works:
# Rewrite all domains to one domain
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.cavabtap\.com [NC]
RewriteRule (.*) http://www.cavabtap.com/$1 [R=301,L]
...