Forums / General Questions / .htaccess url mask not working

.htaccess url mask not working

Locked

Started by support on 4 Oct 2010, 1:36 PM · Views: 1,515

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
4 Oct 2010, 1:36 PM
#1
support avatar

support

New Zenner

Join Date:
Sep 2010
Posts:
3
Plugin Contributions:
0

.htaccess url mask not working

I'm plain stumped, I cant seem to get my .htaccess file to mask the url maps for my cart install.

I dont want my customers to see any url map other then the top level domain, ie: http://mydomain.com

a section of my code looks like

RewriteEngine On
#
## Deny access to extension xml files
<Files ~ "\.xml$">
Order allow,deny
Deny from all
Satisfy all
</Files>
## End of deny access to extension xml files
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
#URL MASK
RewriteCond %{REQUEST_URI} ^/cart/($|/)
#
RewriteRule ^.*$ http://mydomain.com [L]

I am soooo stumped, I don't want to install seo modules to get this working.

Anyone else know of a win?

5 Oct 2010, 4:22 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: .htaccess url mask not working

support:

I'm plain stumped, I cant seem to get my .htaccess file to mask the url maps for my cart install.

I dont want my customers to see any url map other then the top level domain, ie: http://mydomain.com
Sounds like you're trying to hide your site in a frame. Bad idea.

What exactly are you trying to accomplish by hiding the URLs from your customers?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.