i have removed a page because of possible duplicate contents issue at the moment i have a 404 error that redirect to the home page would be best if i create a blank page of the same name with a META redirect to the home page ? what is the best solution to save the PR of the page i have to remove ? thank you ! Dario .
You have to create a .htaccess file, and put this code in it. redirect 301 /directory/file.html http://www.domainame.com/directory/file.html The first part (/directory/file.html) is the old pages path/name, the second part (http://www.domainame.com/directory/file.html) is the url it's being redirected to. You then upload this to your server root; inside public_html
301 redirect for sure. cause it tells the search engines spiders to follow the url.. do not do 302 redirect cause it uses frames
If it was me, I would not remove the page at all, or even do a redirect. That page still has good use as far as pr is concerned. You could use it point to some of your other sites with a small amount of outbond links on it thus giving your self some good pr backlinks. And yes, I would change the meta description and title and all that stuff to content and anchor text that will point to another site. That is just me and what I would do. Just make sure that the page can still be reached from another page that also has good pr, this way that page still has some links pointing at it and it will keep it current pr.
What if you change a folder name? How would you redirect it and all its contents? Right now I am using this code (change /mycars/ to /cars/) .. RewriteRule ^mycars/(.*)$ cars/$1 [L] But I would like to make it perminent 301 redirect ..
Easy: change [L] to [R=301,L], and change "cars/$1" to be the full URL include your hostname. RewriteRule ^mycars/(.*)$ http://www.domain.com/cars/$1 [R=301,L] Code (markup): Cryo.
Because you must - it's defined in the HTTP protocol. It will not work otherwise. Your original code was not a redirect, but a URL rewrite. You had two directories "cars" and "mycars" with the same content. If only one of those is indexed by the search engines, then you're okay. Otherwise will be seen to have duplicate content. By the way, there is no penalty for having duplicate content within your site - Google simply apply a filter so that only one result is shown from your site. I heard it from Vanessa Fox's own lips (Google Sitemaps Product Manager). Cryo.
I would just use one of these on the specific pages Redirect in PHP <? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.new-url.com" ); ?> Code (markup): Redirect in ASP <%@ Language=VBScript %> <% Response.Status="301 Moved Permanently" Response.AddHeader "Location", " http://www.new-url.com" > Code (markup):
I would probably do the same thing. Just remove the duplicate content and put something else in there.
Some tips For Ht.Access Code: This causes the server not to list the contents of directories (when there is no index). This keeps people from typing in http://www.example.com/images/ (or any other directory) and getting a list of the files. Code: This code tells your server to process PHP code in files with the .htm extension. Some servers allready do this by default, but many do not. You can also add .html to the end (or any other extension) if you like. This will keep you from having to rename files to php if you add scripts in later, and also I just happen to like it more Code: The control panel of many hosts let you set the custom error pages, but doing it directly is just as easy. I use these 5 common ones. Just create your pretty error pages, and point to them in .htaccess. Code: Just a basic redirect example here. For when you get rid of a page and want all links to it to just point to the index. Code: Here we get a little fancier. This is for when you remove an entire directory. It will make any link to that directory (including all pages and sub-pages in it) go back to your main index. Code: Say you have a sub-site on your domain.. in the 'subsite' directory, and you moved it to its own domain. These two redirects will take all possible link combinations and redirect them to the new domain. Even if the link is like this : /subsite/1/2/3/4/index.php it will redirect to www.example.com/1/2/3/4/index.php. The two lines give you better flexibility. It handles all combinations of trailing slashes, directories/files, and www. prefixes. Code: This code gets the server ready for the next few things we will do Code: This bit of code is quite usefull. It will take any links that do not have www in them, and add it to the URL. This means no matter how they link to you, your full domain (with the www) will get the backlink. Code: This is basic hot-link protection code. I did have two other lines added to it (to take care of the times when the link does not contain the www) but if you use the last tip, you do not have to worry about it. Just make sure to put them in order (so the www gets added before the hot-link protection). This will only allow hot-linking from your site. If you want to add another site, just add the appropriate lines. Now if you want to sometimes allow hot-linking, here is a good method. Create a directory called 'share' (or whatever) and stick in a new .htaccess file with only this line: Code: This will counter-act the global .htaccess, and allow hot-linking from whatever directory you stick it in (and sub-directories)
jaguar-archie2006 If I am using this redirect code Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^onlinemarketingadvisors.com$ [NC] RewriteRule ^(.*)$ http://www.onlinemarketingadvisors.com [L,R=301] What other code can I place in this if just want to redirect one of my inner pages to another site? Nothing seems to be working.
Ok, I have an old domain and would like to redirect all inbound links to a single forum page. Looks like the 'redirectMatch 301' is what I need. But when I put a '?' in the URL for the cat # .. the url comes back as %3f in the browser. Is there a way around that?