tzak902 Posted February 12, 2022 Share Posted February 12, 2022 Hello, i have set my admin folder to be accessible only from a static IP 1.2.3.4 (for example). How can I redirect users to home page of the store if the IP is not equal to 1.2.3.4 ? I have the following code, but it didn't work: RewriteEngine On RewriteBase / RewriteCond %{REMOTE_ADDR} !^1.2.3.4 RewriteRule .* https://example.com [R=302,L] Any idea please. Link to comment Share on other sites More sharing options...
Nickz Posted February 12, 2022 Share Posted February 12, 2022 What do you want to archive? Link to comment Share on other sites More sharing options...
tzak902 Posted February 12, 2022 Author Share Posted February 12, 2022 If a user browse to /admin with an ip not matching 1.2.3.4 he would be redirected to the main website example.com How to achieve this Link to comment Share on other sites More sharing options...
Nickz Posted February 12, 2022 Share Posted February 12, 2022 Supposedly the admin folder has a numbered sequence no one but you know. Link to comment Share on other sites More sharing options...
tzak902 Posted February 12, 2022 Author Share Posted February 12, 2022 I still want to achieve this if a user got to the correct admin link Link to comment Share on other sites More sharing options...
SmartDataSoft Posted February 14, 2022 Share Posted February 14, 2022 On 2/12/2022 at 8:42 PM, tzak902 said: I still want to achieve this if a user got to the correct admin link If you give a hard admin folder name only you are able to know. If user got ftp then they can know other wise not. Link to comment Share on other sites More sharing options...
tzak902 Posted February 15, 2022 Author Share Posted February 15, 2022 Ok thank you for the advice. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now