.htaccess rewrite rule not working ?

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

If you wish to attach one or more files enter the details below.

Maximum filesize per attachment: 1 MiB.

Expand view Topic review: .htaccess rewrite rule not working ?

Re: .htaccess rewrite rule not working ?

by Baptiste » Thu Feb 06, 2020 1:08 am

Thanks, that worked perfectly !

Re: .htaccess rewrite rule not working ?

by axew3 » Thu Jan 30, 2020 8:17 am

I'm trying to prevent phpBB users from registering or login from phpBB.
Instead I want them to use /login and /register pages on my WP.
This can be achieved in several ways.
So you disabled registrations in phpBB, then you want that if an user try to access the registration page in phpBB, it is redirected to wp registration page, in the case he will try to access via direct phpBB url.
And you do not want users login in phpBB.

Disable registration in phpBB.
Then deactivate the fast login (maybe) that appear into index bottom, disabling into acp.
Then you could do via js, detecting onclick the event.
Yes via htaccess more secure ...

This is the easy way using htaccess:

Open .htaccess in phpBB, and where

Code: Select all

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ app.php [QSA,L]
immediately BEFORE add this:

Code: Select all

RewriteCond %{QUERY_STRING} ^(.*)(mode=login&)(.*)?$
RewriteRule . https://subdomain.w3host.com/wordpress/wp-login.php [R,L]
Change https://subdomain.w3host.com/wordpress/wp-login.php to point to where you need to be redirected

Re: .htaccess rewrite rule not working ?

by muti » Thu Jan 30, 2020 7:11 am

Your link do now work. And cannot see the login url, the url is not static to make it easy.
Page not found
The page you requested could not be found.

.htaccess rewrite rule not working ?

by Baptiste » Thu Jan 30, 2020 3:25 am

I'm trying to prevent phpBB users from registering or login from phpBB.
Instead I want them to use /login and /register pages on my WP.

I tried creating .htaccess RewriteRule in phpBB .htaccess and in WP .htaccess, nothing worked.
I tried everything with Rewrite base as well, nothing seems to work.

My phpBB is inside my wordpress directory, like :
https://www.mydomain.com/wordpress/phpBB

I suspect WP is over-riding any rewrite rule I try, do you maybe have an idea of how I should do ?

Top