Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

301 Redirect For One File? Need .htaccess Pls


  • Please log in to reply
3 replies to this topic

#1 lister

lister

    HR 5

  • Active Members
  • PipPipPipPipPip
  • 419 posts

Posted 04 October 2013 - 08:11 PM

Hi Everyone! OK - a page on my site has recently had a shopping cart embedded and SSL has been correctly implemented so all is good....

but - I'd like to make sure that I can also redirect any juice over to the page using a 301 .htaccess - so the page has 100% the same path except for the secure https layer.

There is a firehose of info out there, has anyone got a proven snippet that works?

I am thinking this:

 

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !myfolder/checkout.php
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

 

* Please note that the page I need to change is in a folder....red is my page that i need to redirect from its' old http path

Thanks VERY much everyone as always for your AWESOME help.



#2 chrishirst

chrishirst

    A not so moderate moderator.

  • Moderator
  • 7,103 posts
  • Location:Blackpool UK

Posted 05 October 2013 - 03:07 PM

Why would you want a 'checkout' URL to get any 'juice'?????

 

 

Allowing it to be indexed by search engines is simply going to throw the "Abandoned cart" stats WAY OFF.

 

A 'checkout' document should ONLY be available to user agents that have items that CAN be 'checked out'



#3 lister

lister

    HR 5

  • Active Members
  • PipPipPipPipPip
  • 419 posts

Posted 05 October 2013 - 04:12 PM

OK, perhaps I wasnt clear.

I have a web page on my site - lets called it mysite.com/greatpage.html (which was under a basic http path) that ranks great.

The mentioned page, which ranks great, has just become https (same content, same path etc - we just added a payment feature that accepts credit cards).

How do I redirect http to the new https for that specific page? I.e. the ONLY difference is that the path now has https. That's it.

Hope that is clear and thanks for your help.



#4 chrishirst

chrishirst

    A not so moderate moderator.

  • Moderator
  • 7,103 posts
  • Location:Blackpool UK

Posted 06 October 2013 - 05:30 AM

which ranks great,

 

Does it get any useful traffic to make it worthwhile redirecting it?

 

And, this post has some PHP code that you can use on a custom 404 URL to redirect single pages that have been removed or relocated.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

SPAM FREE FORUM!
 
If you are just registering to spam,
don't bother. You will be wasting your
time as your spam will never see the
light of day!