Recent Topics

1 Mar 28, 2010 01:16    

My b2evolution Version:

I am trying to get some thing to work on my site...

I using the b2evo blog site as entry point to my site, but only if you came to my site from some lusers site...

in the root web directory I have an .htaccess file


Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://some\.jerksdomain\.com [NC]
RewriteRule ^.*$ refer.html [NC]

I have to use the above ReWrite rule as if I try to forward direct to the blog I get error 500's or complaints that fireturd detects an error, Konqueror, and others error out, basically a cyclic link...

I do NOT have the sample.htaccess thats provided with b2evo enabled. One I do not care about nice URL's, and a whole host of things.. as google etc. is blocked via robots.txt, I am not interested in google and company finding my site its not really for that purpose...

What I would like to have is something like


Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://some\.jerksdomain\.com [NC]
RewriteRule ^.*$ blog/blogs/blog.php [NC]

This doesn't work, and gives 500 Internal Server errors etc.. I've had to restort to the first code which has a meta-refresh line to forward to the blog, and thus kills the referring info, although if you end up there I really know where you came from any way....but I would really prefer to have it direct over the kludge I had to use via meta-refresh and an intermediary page.

I've tried the ReWrite roll to various things.... like other URL's and its fine, but if I try to forward to the blog direct it bombs out... I've tried every format of line I can think of for the rule /blog/blogs/blog.php , http://www.mydomain.com/blog/blogs/blog.php , http://www.mydomain.com/blog/blogs/, /blog/blogs/, blog/blogs/

No joy.

Any one have any hints ???

Standard LAMP CentOS 5.x/MySQL 5/PHP5 web server

Dir structure:
/ (webroot)
/blog/
/blogs/

Thanks!

2 Mar 28, 2010 03:58

Welcome to the forums.

First see if removing "Options +FollowSymlinks" fixes server error.

- try to add "RewriteBase /"
- see if this works better

RewriteRule ^  blog/blogs/blog.php [NC]


or

RewriteRule ^  blog/blogs/blog.php [NC, L]

3 Mar 31, 2010 17:16

OK.. finally had a chance to mess with this...

Removing the followsymlinks and changing to:


RewriteRule ^  blog/blogs/blog.php [NC]

It now WORKS for the referrers that end up at the same site/domain.

Thanks!
:D

ie:

lusersite.com - > mysite1.com - > blog

The problem I've got now is for a 2nd domain on a different server.

lusersite.com - > mysite2.com - > error

Apache wants to append a portion of the URL on to URL I am redirecting to! :>

like this:


http://www.domin.info/blog/blogs/blog.php?title=somspewagefromthelink

I just want


http://www.domin.info/blog/blogs/blog.php

or

http://www.domin.info/blog/blogs/

Same leakage with


RewriteRule ^  http://www.domain2.info/blog/blogs/blog.php [NC,L]

I juts want to nuke off the leakage of a portion of the original link thats not needed..

I tried:


RewriteRule ^  http://www.domin.info/blog/blogs/$ [NC,L]

RewriteRule ^  http://www.domin.info/blog/blogs/blog.php$ [NC]

Since $ = end? Obviously its not the END I think it is! :)

Still no joy

black art (thats a quote from the Apache docs....) no kidding
Thanks!


Form is loading...