Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
584 views
in Q2A Core by
Hi,

I would like to redirect all requests from a certain IP to the file qa-admin-app.php

 

RewriteCond %{REQUEST_URI} ^index.php?qa=admin&(.*)

RewriteCond From IP

RewriteRule /index.php

 

I'm not that good at mod_rewrite, but would something similar work?

Thank you for your help. Best,

Oliver
Q2A version: Latest

1 Answer

+1 vote
by
You could just use PHP in your theme's layer:

if($_SERVER['REMOTE_ADDR'] == 1.2.3.4)
    qa_redirect('/qa-admin-app.php');
by
To view an admin page, you would use:

qa_redirect('admin');
by
ah, sorry, I thought it was a custom php file he was referring to.
...