Follow us on Twitter!
I'd prefer to die standing, than to live on my knees - Che Guevara
Saturday, April 19, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 28
Guests Online: 27
Members Online: 1

Registered Members: 82839
Newest Member: fezphantom
Latest Articles
View Thread

HellBound Hackers | Computer General | Webmasters Lounge

Author

Mod_rewrite help

Mouzi
Member



Posts: 144
Location: Finland
Joined: 08.08.06
Rank:
Newbie
Posted on 03-11-08 16:20
Anyone good with Apache mod_rewrite?
Or do you know where I should look for help?

Anyway here's my problem:

I want to show different content if a cookie is matched so I do this:

Code
RewriteEngine on
Options +FollowSymLinks

RewriteCond %{HTTP_COOKIE} .*site=i.* [NC]




So far so good. Everything works to this point, but the problem comes with the RewriteRule.

My webhost is structured like this:
/home/user/ and then the user's contents
I have made it so that my main domain goes to /home/user/public_html/

Also the .htaccess file I use is in /home/user/public_html/.htaccess

Now if I wanted to (internally, so that it won't change the URL) redirect all requests to /home/user/public_html/isite/, (which could be represented as mydomain.com/isite/), it will redirect indefinitely because the cookie is still there and the .htaccess checks for it. Another option would be to redirect all requests to /home/user/isite/ which would be much better, but I can't get it to work :S I have tried to modify the path with RewriteBase, which gave 500 internal server error, and with ../, which gave bad request error. Any suggestions?

EDIT: Argh, noone ever replies in my threads :P Anyway I got it working with a [NS] flag. Still can't get the second option working though :/

EDIT2: It didn't work after all...


izuom.net/sig.gif
Steganographs

Edited by Mouzi on 03-11-08 18:19
You would try to hack it anyways.