Forum Moderators: phranque

Message Too Old, No Replies

htaccess allowing one referrer

htaccess referrer redirect

         

Onetouchdesign

8:07 pm on Nov 8, 2011 (gmt 0)

10+ Year Member



I am looking for a way to allow access to my shopping cart from one specific url. How can I set the htaccess so that anything coming from [tools.approveddomain.com...] is allowed into the shopping cart and anything else is redirected to a specific domain?

Thanks in advance for the help

wilderness

8:14 pm on Nov 8, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Is your shopping cart in its own directory?

You've omitted necessary details?
Does your cart run on PHP and utilize strings for the URL's?

Place an htaccess in the cart directory:
1) deny all
2) exclude desired IP

Onetouchdesign

8:36 pm on Nov 8, 2011 (gmt 0)

10+ Year Member



The shopping cart is in it's own directory. it is php and uses strings for the url's.

There is already an htaccess in the shop directory where the cart is run from.

Here is the contents of the htaccess doc that I am looking to update:

DirectoryIndex index.html index.php

<IfModule mod_rewrite.c>
RewriteEngine on
# Some hostings require RewriteBase to be uncommented
# Example:
# Your store url is [yourcompany.com...]
# So "RewriteBase" should be:
# RewriteBase /store/cart
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !\.(png|gif|ico|swf|jpe?g|js|css)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php?sef_rewrite=1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} .*\/catalog\/.*
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteRule . index.php?sef_rewrite=1 [L,QSA]

</IfModule>


Already a lot there

Onetouchdesign

8:38 pm on Nov 8, 2011 (gmt 0)

10+ Year Member



Sorry, and yes it is php