Search Engine Optimization
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignSearch Engine Optimization

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 24th, 2008, 06:29 PM
Moondoggy Dogg Moondoggy Dogg is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Location: Vancouver, BC
Posts: 37 Moondoggy Dogg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 54 m 23 sec
Reputation Power: 4
301 Redirect - single HTTPS file to HTTP

The way the website I am working on right now uses a single directory to host the HTTP and HTTPS websites. How would I go about setting up a 301 redirect for one file to always redirect from the HTTPS site to the HTTP one?

I would assume the best way to handle this regardless of file type would be through .htaccess but majority of the tutorials I have read don't quite cover what I want to do.

Reply With Quote
  #2  
Old April 28th, 2008, 09:53 AM
Tolerant Tolerant is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2007
Posts: 62 Tolerant User rank is Corporal (100 - 500 Reputation Level)Tolerant User rank is Corporal (100 - 500 Reputation Level)Tolerant User rank is Corporal (100 - 500 Reputation Level)Tolerant User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 10 h 53 m 27 sec
Reputation Power: 6
As far as I familiar with redirects, this kind of redirect is used on the server side and if you have paid web hosting account - just ask web hosting company to do that for you. I believe that any company would be more then happy to help you.

Reply With Quote
  #3  
Old May 11th, 2008, 05:26 AM
jazajay jazajay is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 224 jazajay User rank is Corporal (100 - 500 Reputation Level)jazajay User rank is Corporal (100 - 500 Reputation Level)jazajay User rank is Corporal (100 - 500 Reputation Level)jazajay User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 4 h 17 m 4 sec
Reputation Power: 3
Hi MoonDoggy Dog.
Sorry I'm being thick.

Both files use the same directory but for different sites. Is that correct?

Are both files are on the same server or different ones?

Sorry I'm being thick, and the booze from last night isn't helping

But if they are on the same server something like this should do it in your .htaccess file, I don't use https in my rewrites nor ever need to include them so I'm not 100% sure this will work TBH but my logical guess goes like this -
Quote:
RewriteEngine On
RewriteCond %{HTTP_HOST} !www\.yourSite\.com
RewriteRule ^(.*)$ http://www.yourSite.com/$1 [R=301,L]


What this does is redirect everything to your http www. version of your site, change the RewriteRule if you need the destination URL to be different. As in the non www. version or a different domain extention.

This will rewrite everything that is not www.yourSite.com to www.yourSite.com though so make sure you need to do this in your case other wise you may cause your self some grief afterwards.

I would say though that Tolerant is right, if you are not use to rewriting and redirection get your hosting to do it for you, I wouldn't start testing on live pages for your first time. If they screw up it's their a-s-s and not yours. Well not so much yours

Jaz

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignSearch Engine Optimization > 301 Redirect - single HTTPS file to HTTP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway