Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Redirect http://domain.com to http://www.domain.com ?


evalguy

Recommended Posts

Posted

Added an SSL cert today (created for www.domain.com), so any access to https://domain.com (without the "www.") brings up an alert dialog box regarding the certificate, which I'd like to prevent. So I'd like to do a conditional redirect on the homepage of my website (not yet in osC catalog dir). I know I can redirect with META, but not sure how to do this conditionally. Also open to other options such as mod_rewrite, javascript, etc.

 

Thanks,

-Neil.

Posted

Just thought of something else, which I implemented as a test. Works, but wondering if this has any potential to go awry. What I did was to create an index.html page (which is the default when a user comes to my site) and that only has a META refresh to http://www.domain.com. I also changed all references of domain.com in configure.php to www.domain.com. This way, I expect that once the user is in the site, every link, page-change, etc should go to something with "www." at the start. Any chance of somehow getting back to non-www-prefixed page?

 

Thanks,

-Neil.

Posted

Quickly eating my words, it works in Firefox, but not in IE. Argh!

So I'm back to looking for a workable solution.

Thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...