Tag Info

Hot answers tagged

9

If the root (/) 301 redirect to /en/, Google will most probably consider your homepage is http://www.example.com/en/ and there is no problem not to have a root (/) page. Regarding Google guidelines for multilingual sites, you can use this method to separate languages on your site.


5

No, you do not need a separate registration. http:// or https:// are just protocol specifiers. The name will resolve to the same host. However, once you're on the hosted machine, the web server determines what to display. Often, HTTP (port 80) and HTTPS (port 443) can be routed to different pages. This should be configurable by the website admin/tools. In ...


3

From an SEO point of view, no, it's not a problem for your page to have no root. Search engine's index URLs, it doesn't matter if they're in subfolders or not. However, from a user-experience point of view you really shouldn't assume that anybody who lands on the root of your site wants to see the English version. Let's say a Japanese user tells one of ...


2

You could do it in the PHP itself <?php header("HTTP/1.1 301 Moved Permanently"); header("Location: http://www.domain.com/course/view.php?id=2&section=1"); ?> You could do it with mod_rewrite RewriteEngine On RewriteCond %{QUERY_STRING} ^id=2$ RewriteRule ^/?course/view\.php$ http://www.domain.com/course/view.php?id=2&section=1 [L,R=301]


2

In .htaccess: RewriteEngine On RewriteCond %{QUERY_STRING} =id=2 RewriteRule ^course/view\.php /course/view.php?section=1 [R=301,QSA,L] If the query string matches exactly id=2 then externally redirect. The QSA flag combines the original query string with the new one, so the resulting URL is actually ?section=1&id=2 - but the order should not matter. ...


2

I am going to assume you mean that any request for example.com/page.html outputs the content of the file from websitedirectory/page.html. If it was "redirected" then the browser would show the subfolder in the URL. In your case, there is no effect on SEO. Search engines will see the same URLs you see in your browser and won't know about the subdirectory ...


2

If you see a totally different website, and your site is on shared hosting, it may be the case that your hoster has a configuration problem. This was the case in a similar question: "https://" refers to random site, "http://" is broken, but "http://www" works Check if your and the other site are hosted by the same provider ...


2

You need to change your Redirect (mod_alias) to RewriteRule (mod_rewrite). Something like: RewriteRule ^word1/word2/word3 /word1/word2 [R=301,L] (Put back example/ if you wish, but it looked like a typo to me?) The problem you are experiencing is that mod_rewrite (nearly) always executes before mod_alias, regardless of the order of directives in your ...


1

Here you go.... this should work: <rule name="IE8FacePalm" stopProcessing="true"> <match url="\" ignoreCase="true" /> <conditions logicalGrouping="MatchAny" trackAllCaptures="false"> <add input="{HTTP_USER_AGENT}" pattern="MSIE 8.0" /> </conditions> <action type="Redirect" url="http://x.com/a-url" ...


1

Maybe this link (how to redirect domain according to country IP address) can help you. I think, however, that this is not a good practice. Redirection by language or country is quite strict. It is better preferred: A message at the top of your site that influence the visitor to go to the page built with his language. A system that can easily change the ...


1

The way I would do this is block all requests which are coming from unwantedcomain.com by checking for HTTP_REFERER Block traffic from a single domain: RewriteEngine on RewriteCond %{HTTP_REFERER} unwateddomain\.com [NC] RewriteRule .* - [F] Block traffic from multiple domains: RewriteEngine on RewriteCond %{HTTP_REFERER} unwanteddomain\.com [NC,OR] ...


1

It has been a while since I have had to do this so I am a bit rusty. Please excuse any errors. Here are some Apache documentation links: http://httpd.apache.org/docs/current/sections.html http://httpd.apache.org/docs/current/vhosts/ Here are some other reousrces that seem to be good: ...


1

CloudFlare has an awesome feature that automatically injects the user's country into the request headers (and this works even on their free plan). You could then easily use a server side redirect to direct the visitor to the appropriate URL based on this header. I've been running CloudFlare on top of our site for a while and am loving it so far. ...



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