Join us at IRC!
It is the path of least resistance that makes rivers and men crooked. - Bj Palmer
Thursday, May 24, 2012
Navigation
Members Online
Total Online: 32
Web Spiders: 17
Guests Online: 29
Members Online: 3

Registered Members: 70201
Newest Member: subnick
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:
God
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:

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



Steganographs

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

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.