Hi,

I've installed the phpbb module but the redirections are not working. I've put the .htaccess given in the package and I had a look at it but I am not sure I have to change it.
My website is installed at the following place on the server: /www/drupal_site/
And the phpbb: /www/drupal_site/forum/ (-> /www/drupal_site/forum/.htaccess)

The users session seem to work but when I click from my forum on "register" or "profile", I am not redirected to the drupal site.

Could you please help me to solve this issue? What have I to check?

Thank you in advance,
Adrien

Comments

arkepp’s picture

Is this for phpBB 2.x or 3.x?

Do clean URLs in Drupal work?

adrienf’s picture

Hi arkepp,

phpBB 2.x and yes clean url work.

arkepp’s picture

Actually, I think http://groups.drupal.org/node/5763 talks about the same thing.

it's a bit strange because noone else has reported this, yet that version of the module hasnt changed for ages and it works on the demo server (as you can verify yourself).

Makes me wonder whether

RewriteCond %{QUERY_STRING} ^mode=viewprofile&u=(.*)$
RewriteRule ^profile.php(.*)$ ../user/%1 [L]

is interpreted diffferently on different servers, i.e. that the %1 is not taken from the first line.

Do you know where you are redirected? What page do you end up requesting, according to the error log on the webserver?

What type of server (Apache 1.x , Apache 2.0.x , Apache 2.2.x...) is this?

arkepp’s picture

Actually, I think http://groups.drupal.org/node/5763 talks about the same thing.

it's a bit strange because nobody has reported this earlier, yet that version of the module hasnt changed for ages and it works on the demo server (as you can verify yourself).

Makes me wonder whether

RewriteCond %{QUERY_STRING} ^mode=viewprofile&u=(.*)$
RewriteRule ^profile.php(.*)$ ../user/%1 [L]

is interpreted diffferently on different servers, i.e. that the %1 is not taken from the first line.

Do you know where you are redirected? What page do you end up requesting, according to the error log on the webserver?

What type of server (Apache 1.x , Apache 2.0.x , Apache 2.2.x...) is this?

adrienf’s picture

It is an Apache/1.3.37 (Unix). Total config available at http://90plan.ovh.net/infos/apache.cgi.
I am in fact never redirected, the .htaccess commands seem not taken into account.

I'll send you the url by PM.

Thx for your help,
Adrien

arkepp’s picture

If you are never redirected then you have a configuration issue.

Try writing some garbage into the .htaccess file, e.g. a new line at the bottom with "abcdefg". This should result in an "Internal Server Error" code 500 if you request any page in the phpBB directory. If this doesn't happen, Apache is not reading the file and you need to find out why.

If you get the error, but no redirects, try replacing the file with a simple example, which redirects all users to Google.com:
RewriteEngine on
RewriteRule ^.*$ http://www.google.com/ [R,L]

adrienf’s picture

Hi arkepp

Try writing some garbage into the .htaccess file, e.g. a new line at the bottom with "abcdefg". This should result in an "Internal Server Error" code 500 if you request any page in the phpBB directory. If this doesn't happen, Apache is not reading the file and you need to find out why.

> I had the error

If you get the error, but no redirects, try replacing the file with a simple example, which redirects all users to Google.com:
RewriteEngine on
RewriteRule ^.*$ http://www.google.com/ [R,L]

> I'm well redirected to google

> What do you suggest? Have I to put the complete path somewhere?
> RewriteCond %{QUERY_STRING} ^mode=register(.*)$
> RewriteRule ^profile.php(.*)$ ../user/register [L]

adrienf’s picture

arkepp,

It seems to work when I remove following char : ^
And put the entire URL for the targetted page
Like this: RewriteRule login.php(.*)$ http://www.mysite.com/index.php?q=logout [L]

arkepp’s picture

Maybe you need to enable the RewriteBase directive at the top off the file, ^ should be okay and writing relative paths should also work.

See the official 1.3 documentation: http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html#RewriteBase