Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I have hmvc-codeigniter I would like to know what the best way is to show one of my views/controller pages for maintenance mode. Where I can view website but any one else that is not on my ip bets directed to this certain view/controller.
I have tried many htaccess codes but non seem to work the way I am after. They still block me from viewing my own website when working on in maintenance mode.
is there a proper function that can add in to index.php in codeingiter that can do what I am after.
CodeIgniter features the Front Controller paradigm, so everything passes through index.php. I don't know how you set your website in "maintenance mode", whether it's through a relational database or if it's just through code.
The idea above ensures that if we add code to index.php, then we know for sure that it's the entry point to our application. A quick fix would be to add the following to index.php:
if($_SERVER['REMOTE_ADDR'] != 'xxx.xxx.xxx.xxx') {
die('Application is currently in maintenance mode. Please return shortly.');
}
While the fix above does resolve the issue, it's never a good idea to remove content unless you have an emergency situation (hacks, DB failure, etc.). You may want to setup a different staging server, work any updates on that server, and the apply them to production.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I am a beginner in Laravel. I have a live project(ex:https://seniorcitizenhospital.com/) made with Laravel.
while I use site::https://seniorcitizenhospital.com/ in google search engine it gives me a search result with some Chinese language(red color) like below image
But there is no use any other language this site. So is this one kind of malware or hacking issue? If something like that how could I protect my site from these issues?
Anybody Help Please? Thanks in advance
My suggestion is to set a dedicated 404 page that returns if no page found.
Currently, whatever URL I place on your website, it returns me 200 all the time.
One of the reasons can be because it already returns 200 no matter what circumstances.
Update:
Even if I look into the security check of your website, the report shows me some malware on your site. Check details here-
https://sitecheck.sucuri.net/results/https/seniorcitizenhospital.com
https://sg.godaddy.com/web-security/website-security-check/results?site=https%3A%2F%2Fseniorcitizenhospital.com%2F
You need to ensure that your website doesn't contain any kinds of malware before asking google to re-index.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
When I created my pet site and visiting it. I noticed money systems and pet systems all need database for them. But I'm wondering is there any way to create new rows for money system? I need money system for that to purchase virtual pets and itens.
So is there any codes when i click on a thing in the site that adds or removes from database date? Thank you a lot!
I thought that follows that code before I know DB:
<?php
$coin=50;
?>
There are no 'magic buttons' working out of the box - you can get that kind of button but you need to create DB structure, connection, write proper functions/methods (depends on your coding approach) and then bind it to that button.
Even if you are going to use some package/plugin or whatever you find useful - you need to have configured DB to be able to use that.
It is even hard to send you some links with examples/documentation as you did not give any kind of information regarding what (I guess) CMS or service you are using.
Deliver more info and then there is a chance that someone will be able to help.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a lot of .php and/or .php files on my site. Is there a way to go through each site/page and work out which ones(if any) have errors in the console in the broswer?
More generally, I am looking at making a change to many pages on my site and I am just wondering what is the best way to automate the test process to see that I did not break anything with the changes I made.
Note: the errors in the console in the broswer, will give me errors, but it would not show errors that only the human eye could detect.
Have you considered an automated testing framework?
http://matthewdaly.co.uk/blog/2012/11/03/testing-php-web-applications-with-cucumber/
Repetitively manually testing ur site is not fun.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Im working on a PHP based web app which allows users to login. What would be the appropriate method of 404'ing all the back-end - (the actual application pages).
I've got a user-tools class which has a check-login function in it, that I use at the moment. If the user isn't logged-in, it redirects to a 404.
However I'm wondering is there a better way to set this up? Could I have a global page that has a list of all the pages that should 404 if the user isn't logged in? If so, how would you set that up?
Many website have all their traffic through a single entry point. In such a setup, you can define a constant in that single file, and check it in every file that is included, so you know whether the file was in fact loaded by the entry file. This method is implemented in MediaWiki for example.
Another solution is to put all the include files outside of the document root. Many frameworks (like CodeIgnitor and others) allow you to specify this directory, and allow you to put it anywhere you want. If it's outside the doc root, visitors cannot load files from that directory directly.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am implementing GeoTargeting in my website to show different content based on whether traffic is from US or NON US.
I have every thing set up the way it should be. Now I want to test and see if its working for NON US traffic.
How can I do that. I would like to also test features of the website when I am testing for NON US traffic.
Two professional solutions:
Geosurf
GeoEdge
Both offer a toolbar as plugins for some browsers where you can "simulate" (aka proxy).
You need some sort of geolocation database to test against. Here's one: http://dev.maxmind.com/geoip/legacy/geolite/
From there, it wouldn't be too hard to figure out where users are coming from... though it will never be 100% accurate.
There's also the HTML5 geolocation: http://html5demos.com/geo - but users have to explicitly allow location reporting... and it doesn't work all the time, either, even if they accept.