Control access on two Urls with . htaccess

Asked

Viewed 36 times

0

I have the folder of login from my website www.meusite.com.br/login and that. after logging in. goes to the www.meusite.com.br/painel. The point is, I need to apply a rule to the login and another rule for the panel, but one subscribes to the other:

RewriteEngine On
Options All -Indexes
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ login.php?lg=$1
RewriteRule ^(.*)$ painel.php?url=$1
  • You explicitly told your server: "redirect all URL to login.php and redirect all URL to painel.php". What exactly would be the redirect rules for each?

  • so...i have an admin folder with login.php and panel.php; exmplo: https://www.rentuetemporada.com.br/auth/habr/login ai ai depois https://www.rentuetemporada.com.br/auth/panel

  • in login I have css files...and in the panel I have the whole structure, I mean, I need to be isolated;

  • htaccess ta file inside admin folder

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.