itchy

sorry i couldn't find a board on htaccess so i'll post this here...
here's the problem. i am trying to implement a htaccess cloaking solution as a step up from simple

php

  ip cloaking but i'm on shared resellerzoom hosting so i can't use rewritemap. if i try i get a server500 error and my research has led me to believe its because i can't access the

apache

  config file.
is there another way i can check a text file of spider ips from the htaccess file to implement ip cloaking without having to add entries to httpd.conf?
so far i've tried this but i get the 500 error:

Options -Indexes +FollowSymlinks
RewriteEngine On
RewriteMap spiderlist txt:home/user/public_html/ips.txt

thanx
itchy

JasonD

If you can wait a while there "may" be another way to accomplish what you want that doesn't require .htaccess httpd.conf or any modification on your server.

As to rewritemaps themselves, from memory alone, if it isn't enabled within httpd.confg you can't overwrite that value via .htaccess

itchy

quote
As to rewritemaps themselves, from memory alone, if it isn't enabled within httpd.confg you can't overwrite that value via .htaccess


yep thats what my research has shown. do you know if its just a case of just enabling them or do i have to explicitly add the actual rewritemap rule in. i'm getting conflicting info off the web. if its the latter support may do it for me as we have a good rapport and they're "aware" of my site building style.

quote
If you can wait a while there "may" be another way to accomplish what you want that doesn't require .htaccess httpd.conf or any modification on your server.


now you've got my attention. i've implemented a front-end script to handle all incoming requests and display appropriate content as a stop gap for the moment but it really puts me back to square one, cloaking with

php

  though the codes more elegent. for now i can wait so let me know.
and thanx jason

JasonD

The front end script is definately the simlper way to go

perkiset

quote
As to rewritemaps themselves, from memory alone, if it isn't enabled within httpd.confg you can't overwrite that value via .htaccess

That is not my experience - if the

Apache

  instance is not compiled with mod_rewrite, then none of the features work... but I do nothing special to my

Apache

  instances beyond installing mod_rewrite to enable rewrite maps. I use them like a big dog. That being said, I have never used them from htaccess ... since I own all of my boxes I install everything as includes into the httpd.conf.

Are you saying that you'd *like* to cloak via

PHP

 ? IF so I can assist as well - since I currently am doing both... I have sites using a rewritemap as well as a front-end

php

  script solution. CAVEAT: I convert the rewritemap to an NDBM type file for speed in

Apache

 , and I use another format saved in RAM and accessed via APC for speed in pure

PHP

 ... neither is for the faint of heart at the outset, but I'm sure we can get you going in the right direction.

Agree with Jason that the front end script is easier... but I must admit there is an elegance that still attracts me to the

Apache

  rewrite solution... and Jason, based on your other thread you'll understand even better - I have a legacy site that needed upgrading, but it's a nasty confluence of old Kylix code and web services... today that application is:
* Cloaked via rewrite map: certain addresses get passed onto box(a) which has a

php

  based spider site. If it's not in the rewrite map, processing continues
* Split into two services: if the URL looks like (x) then it is proxied onto box(b) with a

PHP

  framework if not, processing continues
* Load balanced into boxes(c..d) running a Kylix application to handle the remaining request types

rewrite maps do all of that for me and they're fantastic. But my new sites and framework simply rewrite all URLs into a single

PHP

  script and all processing is done there... so the

net

 

-net

  is that I've found single-script processing of everything to be much easier and scalable as well. (Although I still use maps for load balancing).

/p

<edit>When I first started with rewrite maps I had lots of errors that LOOKED like it just wasn't looking... by adding rewrite logging I was able to quickly debug what was <not> happening and repair it</edit>


Perkiset's Place Home   Politics @ Perkiset's