Tag Info

Hot answers tagged

5

I changed the DNS so it's the same as my website Does this mean your website is now displaying on their domain? If so undo this ASAP, as this will create a duplicate of your site, which could have na adverse effect on your sites ranking. You should 301 redirect their domain to your domain. Where possible redirect pages on their site to relevant pages ...


3

That should be: RewriteEngine on RewriteCond %{HTTP_HOST} !^www.domain.org$ [NC] RewriteRule ^(.*)$ http://www.domain.org/$1 [L,R=301] The "$1" tells mod_rewrite to add the matched text from inside the parentheses in the pattern to the rewritten URL, which is what you want.


2

First, make sure you set your preferred site(s) to HTTPS mode in GWT. This may require you to make a new property and re-verify it. Now once it's looking for SSL mode, hit the sidebar and nav to "Crawl > robots.txt Tester". You should see a field at the bottom that starts with https://yoursite.com followed by a text box and red "TEST" button. You should ...


2

The best way to determine why Google can't access a page (including robots.txt) is to use the fetch as Google feature in Google Webmaster Tools. Log into Google Webmaster Tools Select your site (Make sure you have it registered with the https://) Navigate to "Crawl" -> "Fetch as Google" Enter /robots.txt in the text box Click the "Fetch" button Google ...


2

Rewrites are what you're looking for as long as you don't redirect (the R flag): # placed under root, ie /.htaccess <IfModule mod_rewrite.c> RewriteEngine on # to prevent infinite redirection and 500 error: RewriteCond %{REQUEST_URI} !^/issues/public RewriteRule ^issues(/?$|/.*$) /issues/public$1 [L] </IfModule> Aliases can ...


2

Search engines will follow multiple redirects as situations like yours are not uncommon. So having two redirects won't be an issue. (This also happens when users use URL shortners, or worse, chain them together which can happen when multiple parties want to track users). But there is an upper limit to how many redirects a search engines will follow. I know ...


2

%{HTTP_HOST} will refer to whatever host the site was accessed through. ie. example.com or www.example.com. To always redirect to www.example.com then simply put this in the substitution: RewriteCond %{HTTPS} off RewriteRule .* https://www.example.com%{REQUEST_URI} [R=301,L] But unless you had a similar rule before then both example.com and ...


2

You will want to use your .htaccess file in the root of each site. You will be creating 2 .htaccess files, one per-site. I am assuming that you have each site defined within Apache as two separate sites. This is important to do. In your .com site: RewriteEngine on RewriteRule ^(.*)$ http://www.domain.org$1 [L,R=301] In your .org site: RewriteEngine on ...


1

Whatever redirection tool you are using is probably bad. webpagetest.org can show you how well your redirects work. Just put in the first page (not the redirected page) and the first entry in the list of URL's the simulated web browser tried accessing will be shown in yellow to indicate a redirect, then the line following it will be the new URL. Google can ...


1

You can replace the real domain with your local ip modifying the host file in your computer (if you are using Windows). Go to C:\Windows\System32\drivers\etc and look for the hosts file. Then add an entry in it like: 127.0.0.1 thelivedomain.com A global text search & replace should work as well but I think the host approach is more safe.


1

With a redirect you'll always be redirecting the user to another location, thus changing the url. Therefore you would probably want to use mod_alias instead of mod_rewrite. Alias /issues /absolute/filesystem/path/to/issues/public


1

For anyone who has this issue come up, changing the DNS to v1 using Namecheap's online interface and then setting the "@" row to blank fixed the issue.


1

You could set an environment variable in the RewriteRule directive and set the Cache-Control header conditionally based on the presence of this environment variable... RewriteRule ^section$ /newsection [NC,L,R=302,E=cachesection:1] Header always set Cache-Control "max-age=86400" env=cachesection ...to cache the "temporary" redirect for 1 day.


1

It's unfortunate that the MS documentation is so lacking on this subject. Fortunately, I was able to figure this out. I found the $S and $Q terms documented in the IIS6.0 documentation. <configuration> <location path="app/oldvdir"> <system.webServer> <httpRedirect enabled="true" destination="/app/newvdir$S$Q" ...



Only top voted, non community-wiki answers of a minimum length are eligible