The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 18, 2019, 01:28:20 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: no access to apache conf so how can i htaccess cloak?  (Read 3750 times)
itchy
Rookie
**
Offline Offline

Posts: 12



View Profile
« on: August 13, 2007, 11:44:01 PM »

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:
Code:
Options -Indexes +FollowSymlinks
RewriteEngine On
RewriteMap spiderlist txt:home/user/public_html/ips.txt
thanx
itchy
« Last Edit: August 13, 2007, 11:54:22 PM by itchy » Logged

No links in signatures please
JasonD
Expert
****
Offline Offline

Posts: 100


View Profile
« Reply #1 on: August 14, 2007, 02:27:10 AM »

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
Logged
itchy
Rookie
**
Offline Offline

Posts: 12



View Profile
« Reply #2 on: August 14, 2007, 04:57:33 AM »

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
Logged

No links in signatures please
JasonD
Expert
****
Offline Offline

Posts: 100


View Profile
« Reply #3 on: August 14, 2007, 09:40:13 AM »

The front end script is definately the simlper way to go
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #4 on: August 14, 2007, 10:19:04 AM »

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>
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!