Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rewrite rule help



Mike Zornek wrote:
We allow people to connect to the site with `example.org` or
`www.example.org`. For the area where we do checkout we are forcing the
https via PHP but if they came into the page from `example.org` there is a
warning since our certificate is signed with the `www.example.org` domain.
Is their a good rewrite rule out there I could use. I've tried a few I found
but there weren't working 100%.

The solution to this is actually partly redirecting and partly virtual hosting. When I've got a site that has more than one URL that will work, I usually think long and hard about which URL should show in the browser and almost always make it so they are sent to that URL from all the others that will resolve to the site.


What you want to do is something like this:

<VirtualHost *:80>
  ServerName example.org
  .
  .
  .
  Redirect 301 / http://www.example.org/
</VirtualHost>

That way, you can produce as much ad copy as you want, using the shortened name (even for deep links), and anyone who goes to the site with the short version is automatically sent to the correct location using the full version of the domain name.

-Brian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Web-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/web-dev/email@hidden

This email sent to email@hidden
References: 
 >Rewrite rule help (From: Mike Zornek <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.