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> ```
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
-
Can access my site using www
Hello, when I try to access my website using www i would like it to redirect to non www but instead it shows a sal error message.
On-Page Optimization | | Voopoo2 -
Is it OK to 301 redirect 1000s of duplicate random URLs to homepag?
Hello, We found a critical error in our site internal link structure and the way Google indexes it. Website has 1000s of URLs that are basically 50% match to homepage. They all start the same example.com/category/random/random I can do a redirect match and 301 them to homepage. This way 1000s of bogus url are not indexed and no value given. Is it OK to redirect so many URLs to homepage? Platform is creating these URLs because of search query, where it adds all site content to one page. Currently this search page /category / has own canonical and all those duplicate content URLs have canonical to that /category /. To fix my plan is to a. Remove canonical from /category / that way all those duplicate URLs don't have it either. B. Redirect match all URLs that have /category / in them to homepage. (this is most important page where 50% of that content is and should be the main page). Is this plan ok?
On-Page Optimization | | advertisingcloud1 -
301 Redirect or landing page
Hi everyone. I'm currently doing some SEO for a client, at the moment he has some landing pages which are categorised, but the category is set as a 302 redirect. I have a dilemma whether to 301 redirect to the landing page or make a page for each category. The link structure is as follows - http://examplesite.co.uk/products/fire/company-1/product/ so currently this is set as a 302 redirect - http://examplesite.co.uk/products/fire/company-1/ Do I make this page a category page and link the page to the children with some on-page optimisation or 301 redirect it?
On-Page Optimization | | Unbranded_Lee0 -
301 Redirect from .html
Hi there, Following on from this post:
On-Page Optimization | | finelinewebsolutions
http://moz.com/community/q/help-with-duplicated-content Please could one confirm that using the following code in our htaccess file will stop the duplicated content issue we are having. RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^.]+.)+html?\ HTTP
RewriteRule (.+).html?$ http://www.bereavementstationery.co.uk/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html Kind Regards Alec0 -
23000 Links are not found- Should I redirect them?
Hi I have been deleting product links from my website but never redirect them. On my google webmaster, it shows there is total 23000 products are not found. Should I redirect them all back to the home page? For the pages with soft 404 response.. should I also redirect those original URL back to home page ? Thanks
On-Page Optimization | | ilovebodykits0 -
The best way to redirect to www
What is the best way to redirect non www to www. I saw a lot of the solution. is this one ok? RewriteCond %{HTTP_HOST} !^www.seomoz.org [NC] RewriteRule (.*) http://www.seomoz.org/$1 [L,R=301]
On-Page Optimization | | bruki0 -
Redirect sub domain to domain in .htaccessU
Hi all, (Total newbie with fourth post of the last 7 days askin' for help!...sorry!) I've discovered that we have a lot of URLs indexed with for example: http://test.betxpert.com/some-odd-url This gives me duplicate content in the search engines. I have searched the web and i can not find a solution fore redirecting http://test.betxpert.com/some-odd-url to http://www.betxpert.com/some-odd-url. Can anyone help me what to write in the .htaccess file? Best regards, Rasmus
On-Page Optimization | | rasmusbang0 -
Removed listings: 404, internal links or redirect?
For a classifieds web site with medium/high turnover for the various listings: How would you deal with pages of removed listings? a) would you be "honest" and return a 404 since the listing is not available anymore? b) would you maintain historical data about deleted listings so that you can try and 301 redirect to a relevant search results page? c) would you keep the page alive (maybe add a noindex meta tag?) and show links to multiple relevant search results pages in an effort to strengthen internal linking?
On-Page Optimization | | seo-cat0