Control access to dashboard by IP

Permalink 2 users found helpful
I would like to control access the the dashboard (/dashboard) by IP address. I thought I may be able to do this using .htaccess but I have not been able to find a solution.

Does anyone have a suggestion?

 
Mnkras replied on at Permalink Reply
Mnkras
unfortunately, everything in C5 goes through the index.php which makes it extremely hard to restrict things with external tools,

Edit: you may actually be able to, for the path you want to limit in the .htaccess fiel put,

index.php/dashboard

you need the index.php otherwise it won't do anything
BrianJM replied on at Permalink Reply
Thank you for pointing me in the right direction. This is working for me:

# Deny access to dashboard outside of internal network
RewriteCond %{REMOTE_HOST} !192\.168\.100\.100
RewriteCond %{REQUEST_URI} /index.php/dashboard/.*$
RewriteRule .*http://www.google.com/ [R=301,L]