Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

URL Gatekeeper

Recommended Posts

URL Gatekeeper v0.9

by Anthony David Adams


URLGatekeeper is a simple script which assures that your store is only accessible via the domain name you specify. It's main application is for servers hosting multiple domains via DNS pointing & subdirectories. Store owners who may be hosting their shop on a main server, and using a DNS pointing service for the store domain will find it useful.


URLGatekeeper allows only URL's with the correct domain (www.YOURSTORE.com) to access files. If a non-specified (but valid) domain name / URL is used to access your catalog, the user will simply be redirected to the appropriate page using the approved domain. It features a JavaScript redirect which will overwrite the browser history, to avoid the dreaded 'back-forward' redirect loop. It also includes a redundant meta-refresh for browsers that may have JavaScript disabled, or for spiders, etc.


Should prevent search engines from displaying pages with the non-allowable URL.

May also redirect IP address access.



Link to comment
Share on other sites

This contribution is a great idea but when a user finishes the create new user process when submitting the form the user is bounced back to the create new user form with all blank fields and the account is NOT created.


This action could possibly be the same with other pages.


I had to disable this contribution until a fix for this is available.


Someone posted this 'bug report', however I was unable to replicate it on my server. Has anyone else had this difficulty?


Here is my response, which I have also posted in the contribution area.


I was unable to replicate the "bug". I successfully created a new user @ www.SukaraSterling.com where I have installed and tested the contribution. Please provide more info via email to : anthony(at)creditcovers(dot)com


I have set up a support forum for URL Gatekeeper as well : your are here


Note : this contribution is to be used as a quick redirect back to your primary URL, when a browser attempts to access a page via a non-primary URL. Your build of osCommerce must be configured to run with your primary URL.


for example:


Primary : www.mystore.com


Non-primary : www.myothersite.com/mystore/catalog

Link to comment
Share on other sites

I spoke with the user via email yesterday, and it turns out he simply thought the contribution would do something it wasn't designed to do. He thought we would be able to use it to circumvent having to configure his store to use the new URL, which it won't.


As of now v0.9 is fully functional and bug free.


Just to clarify one more time.. Let me illustrate the application of the contribution with a senario.


You create a store @ http://www.myserver.com/mystore/catalog. It's working great, and you decide to register the URL http://www.mystore.com and set the DNS up to point to ../mystore/catalog on your server. You've reconfigured osCommerce in the configure.php file to build links, access files, etc. through your new URL (www.mystore.com) and everything is working great. You notice, however, that a user can still access individual pages via typing in http://myserver.com/mystore/catalog/index.php (or any other file, directory, etc). You also notice that Google is indexing pages with that address too... When a user clicks on a link on your site, they are taken to the new URL (because you configured it in configure.php) but you are still a bit annoyed - you payed $8 for that domain name!

Solution : URL Gatekeeper v0.9!


You configure & install the gatekeeper.php and also modify your application_top.php file.


Now, when someone tries to open an page with a URL that contains http://www.myserver.com/mystore/catalog/, URL Gatekeeper builds a new link by replacing myserver.com/mystore/catalog with mystore.com and then automatically redirects the browser to the correct URL AND modifies the browser history with the correct URL, so the wrong one is erased for good!


Clicking on this link : http://www.myserver.com/mystore/catalog/somepage.php takes you to http://www.mystore.com/somepage.php


I hope that clarifies any confusion. It is a very simply contribution with a very limited, although very useful, application. To see it in action try visiting http://www.175g.com/sukara - you will be sent to http://www.SukaraSterling.com You can also try to replace www.SukaraSterling.com with www.175g.com/sukara in any URL generated by the store, and you will be taken to the correct SukaraSterling.com page.



Anthony David Adams

Link to comment
Share on other sites

  • 5 months later...

a doubt here, in the case of using third party payment solutions like paypal, moneybookers etc. to complete the order one has to return from the secured page of paypal [standard] or moneybookers...


here how the system could react...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...