So we have people typing in a browser:
domain.com/es
domain.com/es/name-1
domain.com/es/...
I would like it to be forwarded to and masked:
es.domain.com
es.domain.com/name-1
es.domain.com/...
What I want is - if I named it correctly - people type and see in their browser domain.com/es/... all the time and in fact it works as es.domain.com/... but they do not know it.
I have also www to non-www basic re-wirte rule. I hope this is not a problem.
Is there a problem for seo or google with such masking?
Related
I am trying to clean up a previously hacked WordPress site, and domain name reputation, the site has new hosting and is now on a different CMS system, but there are hundreds of spam links in Google I need to get rid of, they look like example.com/votes.php?10054nzwzm75042pw205039
Domain name, then votes.php?**** etc.. Numbers letters all sorts.
So how do I redirect ANYTHING that starts with the domain name then /votes.php?***
Any help greatly appreciated
Unless you have multiple domains, you don't need to explicitly check the domain name.
To send a "410 Gone" for anything that contains /votes.php in the URL-path (and any query string), you can do something like the following at the top of your root .htaccess file using mod_rewrite:
RewriteEngine On
# Serve a 410 Gone for any requests to "/votes.php"
RewriteRule ^votes\.php$ - [G]
A 410 is preferable to a "redirect" if you want to get these URLs removed from the search engines as quickly as possible.
To expedite the process of URL removal from Google then use Google's Removal Tool as well.
If you redirect these pages to the homepage then it will likely be seen as a soft-404 by Google and these URLs are likely to remain in the search results for a lot longer.
I am struggling with an url/parameter issue.
The main index.php page of my website was previously used for e.g.
www.domain.com/index.php?site=3&word=21 and
www.domain.com/index.php?site=3
But now I have changed those things, but in Google the URLs are still listed. So what I need is to redirect all the type of pages above to the main page/domain www.domain.com.
I believe .htaccess redirect is the right thing to use then, is that correct?
What type of code do I need to redirect those to main domain. Just the url's with parameters after index.php? etc. not other directories e.g. www.domain.com/sunshine/
Would be great if someone could help me with this. I believe it is actually a quick fix, but I have failed to get the code correct.
Thanks.
You can add this to an .htaccess in your site root:
RedirectMatch permanent ^/index.php* http://www.domain.com/
But, be careful if your new index page is also named index.php because you might run into a redirect loop.
I'm totally lost here, I have several Magento installations where the backend url doesn't work nice.
The problem is this:
In the frontend, all urls are perfectly rewritten so index.php is not in the url and mod_rewrite works.
but for the admin part, all urls that are created have the index.php part still in there, in a normal installation it wouldn't be a problem put now, a url like index.php/admin/dashboard results in a 404 error page. But, the funny part is that when I remove the index.php part of the url, it works.
I fixed this problem with a few .htacces tricks and hacks, but I find these hacks no good. Some parts of the backend still won't work or need their own .htacces redirect, or won't work at all even with the redirect in .htacces.
So, my questions are: Why are my Magento installations giving 404 errors on a index.php/admin call? And how to nicely get rid of the index.php part in the backend urls, without .htacces hacks?
The Magento version for all shops is 1.7.0.2
The solution is very simple, add "AcceptPathInfo On" to apache configuration.
Credits: http://www.magentocommerce.com/answers/discussion/178/index.phpinstall-was-not-found/p1
I have an e-commerce developed with the CMS Prestashop.
Yesterday i have seen in my Webmaster Tools that i had some duplicated URL, like this:
www.mysite.com/manufacturers
www.mysite.com/it/manufacturers.
Where 'it' is the suffix of the default and only language for the website.
I've already activate the friendly URL in the back-office and also I've a .htaccess file generated automatically by the generator in the back-office.
What should I do to fix this issue?
PS: Also I think that I've already taken a penalization from googlebot.
First of all let me clarify the Title from the SEO point of view. The problem is from Prestashop side not from SEO side. It is just affecting your SEO.
Now on the problem, Prestashop is notorious for URL problems. I would not recommend you the .htaccess hack solution because every time you regenerate your .htaccess from you backend, you have to manually insert that hack again in it to keep the problem down. And suppose this url problem arises again after sometime for some other url than you have to do it again. It can turn into a nightmare.
So here are some of my personal recommendations...
If this site is critical(which I am assuming), buy a Prestashop url rewriting module from a trusted provider. You will also get a technical support in case this problem arises again in future.
If you can't buy than I would suggest you to ask this question on Prestashop forums, as this is Prestashop specific, to permanently solve this problem. You will most likely to get more instant answers as you will find more people working on Prestashop there than here.
Somewhere either in the htaccess file in your document root, or in the vhost/server config for mysite.com, you'll need to 301 redirect. Now you just need to choose which one you want to keep, the one with /it/ in front or the one without? Let's say you want to point everything to the one without, you'll use one of these:
Using mod_alias:
Redirect 301 /it/manufacturers /manufacturers
Using mod_rewrite:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?mysite.com$ [NC]
RewriteRule ^/?it/manufacturers(.*)$ /manufacturers$1 [L,R=301]
Ok sorry if this has been asked before but I could not find a working solution. I am using wordpress multisite. This is what I am trying to achieve.
Currently the domain http://mynew.com/ redirects (via my hosting co.) to one of the sites on my wordpress multisite installation as follows http://myold.com/subsite/
But I want to hide/swap the urls as follows, http://myold.com/subsite becomes http://mynew.com and all links that follow (eg. http://myold.com/subsite/another-link becomes http://mynew.com/another-link) without breaking.
I tried this in my .htaccess file which rewrote the url successfully however the links did not work and returned 404 errors.
RewriteRule ^subsite/(.+) http://mynew.com/$1 [R,L]
Hope that makes sense, thanks for your help.
Of course it will get you a 404 error, you redirected the request from the old site to the new site, but the new site does not contain the requested pages, so it through you a 404, what you need to do is to redirect from the new site back to the old site INTERNALY (that means without changing the browser address bar), but this requires your new site to work as a proxy server, see http://httpd.apache.org/docs/2.2/mod/mod_proxy.html