StartVM Posted September 26, 2014 Report Share Posted September 26, 2014 I have noticed quite a few virtual airlines that struggle to secure their website during development and beta testing. As you all know, without the correct protections, it is easy to view the website by appending /index.php to the URL. In order to combat this and restrict access to your entire phpVMS website by IP address, simply replace your index.php file in your root phpVMS directory with this attachment. The original code has been unaltered, I added about 16 lines of code to the top of it for the ip handling. The code is commented and quite self explanatory on how to work it. Cheers! index.php Quote Link to comment Share on other sites More sharing options...
Tom Posted September 26, 2014 Report Share Posted September 26, 2014 Or, if you'd prefer not to edit core files, a couple of lines in your .htaccess, which also protects other parts of your site: Order deny,allow Deny from all Allow from ##.##.##.## 1 Quote Link to comment Share on other sites More sharing options...
StartVM Posted September 26, 2014 Author Report Share Posted September 26, 2014 Or, if you'd prefer not to edit core files, a couple of lines in your .htaccess, which also protects other parts of your site: Order deny,allow Deny from all Allow from ##.##.##.## Depending on how the web server is configured, it can get complicated if you want to allow a coming soon template to display in the root directory, but good tip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.