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 ?
.htaccess rewrite rule not working ?
-
- User w
- Posts: 16
- Joined: Thu Dec 26, 2019 5:45 am
Re: .htaccess rewrite rule not working ?
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.
- axew3
- w3all User
- Posts: 2883
- Joined: Fri Jan 22, 2016 5:15 pm
- Location: Italy
- Contact:
Re: .htaccess rewrite rule not working ?
This can be achieved in several ways.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.
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]
Code: Select all
RewriteCond %{QUERY_STRING} ^(.*)(mode=login&)(.*)?$
RewriteRule . https://subdomain.w3host.com/wordpress/wp-login.php [R,L]
-
- User w
- Posts: 6
- Joined: Sun Jan 26, 2020 1:35 am
Re: .htaccess rewrite rule not working ?
Thanks, that worked perfectly !