Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to get home/site URL


mark00

Recommended Posts

Posted

What is the proper way to return the home page URL?

I'm aware of tep_href_link(FILENAME_DEFAULT) , but I don't want the index.php appended at the end and preferably would like the URL returned either http or https depending on what the user is currently on.

 

Thanks!

Posted

You can use HTTP_SERVER if your instalation is setup in the root.

 

Another thing that you may want to consider is to install Ultimate Seo Urls 5 PRO and use the "Force www.mysite.com/ when www.mysite.com/index.php" option,

http://addons.oscommerce.com/info/7704

 

You really dont want your homepage to use https though, theres no need for SSL on that page and "may" result in duplicate content

 

Place this code in your shops root .htaccess - changing http:/yourdomain as appropriate:

# No index SSL
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^index.php http://yourdomain.com/index.php  [R=301,L]

Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Archived

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

×
×
  • Create New...