Www redirect
-
I get the following message when I try to start a new campaign.
"We have detected that the domain www.shewula.nl and the domain shewula.nl both respond to web requests and do not redirect"
In the q&a I found answers to this problem and tried to fix it. No success yet.
This is what I have in my old ht.access file:
RewriteCond %{HTTP_HOST} ^www.shewula.nl$
RewriteCond %{REQUEST_URI} !^/STICHTING_SHEWULA/
RewriteRule (.*) /STICHTING_SHEWULA/$1 [last]
RewriteCond %{HTTP_HOST} ^shewula.nl$
RewriteCond %{REQUEST_URI} !^/STICHTING_SHEWULA/
RewriteRule (.*) /STICHTING_SHEWULA/$1 [last]
I changed it to ( got it from the answers
RewriteCond %{HTTP_HOST} ^shewula.nl
RewriteRule (.*) http://www.shewula.nl/$1 [R=301,L]This gave me a 500 internal error in the server header checker tool.
Does anybody know how I can fix this?
The website is in a folder in the root of my other website www.fastingfotografie.nl
Could this give me a problem?
Thanks.
Thomas
-
Thanks Valery. Your code is working too.
I can start with the campaign now.
Regards,
Thomas
-
Here's what you need:
RewriteCond %{HTTP_HOST} !^www.shewula.nl [NC]
RewriteRule ^(.*)$ http://www.shewula.nl/$1 [R=301,L]The 500 error is because you were not escaping the . in your regex on the first line.
The code here will only redirect if it doesn't have the www.
-
<code>``` <code>Your changed one is missing the wildcards. Unless I'm wrong, it would only</code>
<code>match 'shewula.nl' exactly, and not anything else.</code>
<code>This might work, but I'm just eyeballing it and am not good with regex:</code> ```</code>
<code>RewriteCond %{HTTP_HOST} !^(.).shewula.nl(.)$ [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]</code><code>edit-ugh stupid editor auto-inserting code blocks</code> ```
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Unsolved 301 Redirect chain http>https>https:/www
Dear community, I have the same issue with redirecting chain from http - https and then to https:// www.____
On-Page Optimization | | Damian_Ed 0
In one of the previous opened discussions the solution given was: you'd update the server level rule to point directly to the end URL form.
Re: 301 Redirect chain Are there any tutorials or resources available to help me properly implement this solution and resolve this issue? Tags: 301 Redirects, HTTPS, WWW, Server Level Rule, Redirect Chain Any tutorials how to do it properly to resolve this issue ?0 -
Embedded twitter post is good for https://www.fitness-china.com/hip-thrust-machine seo
We have short video posts on twitter. Embedded twitter post is good for https://www.fitness-china.com/hip-thrust-machine SEO?
On-Page Optimization | | ahislop5740 -
Complete redesign of website and 301 redirects
I did a complete redesign and content change for my website. I have my new webpages indexed but they still haven't replaced the old ones after 1 month. In search results I see both the old ones and the news ones. How long of a delay should I expect (approximately) for the old pages to be replaced by the new ones knowing the entire website was changed. Thank you,
On-Page Optimization | | seoanalytics0 -
Redirect question
Hi Everyone I've tried searching elsewhere in these forums for an answer to this but not having much luck - hope I'm not duplicating content! I get this message in Moz: "We have detected that the domain NappyValleyNet.com redirects to www.nappyvalleynet.com. We do not recommend tracking a redirect URL. Would you like to track www.nappyvalleynet.com for this campaign instead?" Is this a set-up issue on my side? I'm not sure what this means? Thank you!
On-Page Optimization | | NappyValleyNet0 -
.htaccess redirect chains
At item 4 in the post at http://moz.com/blog/htaccess-file-snippets-for-seos the author recommends combining .htaccess redirects to avoid chaining redirects. I'd be obliged if someone could expand on: 1. What he means by chained redirects 2. How to combine the redirects per his recommendation Cheers.
On-Page Optimization | | ztalk1120 -
Duplicate content shown in Google webmaster tools for 301 redirected URLs.
Why does Google webmaster tools shows 5 URLs that have been 301 redirected as having duplicate meta descriptions?
On-Page Optimization | | Madlena0 -
Google found bad links delete them or 301 redirect?
we went into our google account and saw about 70 bad links that they found on our site. what's the best thing to do, seo-wise: should we go into the pages that have the bad links and delete them from the html code, or re-direct them in our htaccess script?
On-Page Optimization | | DerekM880