Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Landing site elimination


Ken_Shea

Recommended Posts

Not sure even how to word this.

If https://ontargetsportsonline.com

Is entered it goes to a landing page with a link to the store https://www.ontargetsportsonline.com/catalog_ontarget/

Is it possible to automatically got to the https://www.ontargetsportsonline.com/catalog_ontarget/

I do not like having the nexessary addition of /catalog_ontarget/  but thats the way it is I guess.

Thanks for any input

 

Link to comment
Share on other sites

@Ken_Shea

52 minutes ago, JcMagpie said:

Redirect requests with .htaccess

RewriteEngine on
RewriteCond %{HTTP_HOST} ontargetsportsonline\.com [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ /catalog_ontarget/$1 [L]

This .htaccess file goes in the root of your shop (ontargetsportsonline.com). This is also where you can put the bits to force your htts status, and whether you have the www. in front of your domain, or not (as defined by how your SSL certificate was created).

In your /catalog_ontarget directory, you can have another .htaccess file that just controls how your shop works.

HTH

M

Link to comment
Share on other sites

Also commonly

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/catalog_ontarget
RewriteRule ^(.*)$ /catalog_ontarget/$1 [L] 

This assumes that your store is configured to have /catalog_ontarget in all its links. Only outside visitors who don't explicitly type in the full link get their URL modified. Note that this is not a 301 (permanent) redirect, but you could add that if you want.

Link to comment
Share on other sites

OK, got it working, seems fine, and it got rid of that /catalog_ontarget/ upon entry to the site but does use it in all pages linked to in the site, which is fine..

MrPhil.  going to try your code to see if there is any change as well, might learn something by it.

Thanks so much guys :)

Ken

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...