Suppose, I am building website. I want the user to be able to access the index.php file only. I also have other files like www.mydomain.com/aboutus.php files and user can access them if he types this in his address bar. I want the user to be able to access www.mydomain.com only.  How are such security features built?
I have a php file which I will be using as exclusively as an include. Therefore I would like to throw an error instead of executing it when it's accessed directly by typing in the URL instead of being included.  Basically I need to do a check as follows in the php file:  if ( $REQUEST_URL == $URL_OF_CURRENT_PAGE ) die ("Direct access not premitted");   Is there an easy way to do this?
Is it possible to have two background images?  For instance, I'd like to have one image repeat across the top (repeat-x), and another repeat across the entire page (repeat), where the one across the entire page is behind the one which repeats across the top.  I've found that I can achieve the desired effect for two background images by setting the background of html and body:  html {     background: url(images/bg.png); }  body {     background: url(images/bgtop.png) repeat-x; }   Is this "good" CSS?  Is there a better method?  And what if I wanted three or more background images? Why are map tiles being repeated? Using MapServer and Openlayers Problem I have: map tiles from my layer are being repeated.  Shapefile is projection 3059. I have specified 3059 is in the mapfile and also when creating map object.  I know OpenLayers.Layer.WMS is recommended, but when I use it I only see empty map. When I use OpenLayers.Layer.MapServer, map is displayed (and tiles are repeated), so I'm using that for now.  My layer (EPSG:3059) looks like this    Versions: Openlayers 2.13.1 MapServer 6.0.3  WMS Server mapfile:  MAP     NAME country_map     STATUS ON     SIZE 800 500     EXTENT 313187.4 146161.56 766469.92 470367.64     UNITS METERS     SHAPEPATH "shapefiles"     IMAGECOLOR 155 155 155      WEB         TEMPLATE "template.html"         IMAGEPATH "C:/MS4W/ms4w/apache/htdocs/gis/output/"         IMAGEURL "/gis/output/"          METADATA             "wms_title"             "MapServer + Openlayers"             "wms_onlineresource"    "http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W\ms4w\Apache\htdocs\gis\mapfile2.map"             "wms_enable_request"    "*"             "wms_srs"               "EPSG:3059"         END     END      PROJECTION         "init=epsg:3059"     END  # example layer     LAYER     METADATA         "wms_title"             "lat_rob_region"     END     NAME "lat_rob_region"     DATA lat_rob_region     STATUS ON     TYPE POLYGON         CLASS             NAME "lat_rob_region"             STYLE                 COLOR 0 255 0             END         END     END END   Javascript:  var lon = 25; var lat = 57; var zoom = 5; var map, layer1;  function init() {     map = new OpenLayers.Map( 'map',{displayProjection: new OpenLayers.Projection("EPSG:3059")} );      layer1 = new OpenLayers.Layer.MapServer( "Country map",              "http://localhost:1025/cgi-bin/mapserv.exe?map=C:/MS4W/ms4w/Apache/htdocs/gis/mapfile2.map", {layers: 'lat_rob_region'},             {gutter: 15},{srs: 'EPSG:3059'});     map.addLayer(layer1);      map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);     map.addControl( new OpenLayers.Control.LayerSwitcher() ); } I already have an Apple ID, made at Apple.com. Now, when I want to access the App Store from my iPad, I am told that I have to review my information. On the credit card page, I am not presented with a "None" option, even though I am in the United States.   What can I do to proceed without entering this information? Was Hogwarts named such because of a connection to warthogs? Was Hogwarts named 'Hogwarts' because of a connection to warthogs?  Or was it named for hogs and warts separately, or something else entirely? How to remove Windows 10 from Windows Boot Manager after uninstalling it? I installed Windows 7 on one partition and formatted the other where I had Windows 10 installed leaving only that one Windows 7 OS on my drive, but I still have two OSs offered in Windows Boot Manager. What is even weirder is that their names are reversed, when I choose Windows 10, it's Windows 7 that gets loaded. Is there a way to prove that the order of an element in a Group divides the order of the Group, WITHOUT USING LAGRANGE'S This is a very easy fact we use in Group Theory,  But somehow, I wondered that whether there may be another way (other than Lagrange's Theorem) to prove that the order of an element divides the order of Group.  I attempted to go on the term "exponent" of the Group (just assume that G is a Finite Group), which we may define the least common multiple of orders of elements in G. But this exponent divides $|G|$, since the order of each element divides $|G|$. So it became a little paradox.   Shall I think that; before teaching this fact in a Course, one should teach about Lagrange's first? Why does chmod +w not give write permission to other(o) When I run chmod +w filename it doesn't give write permission to other, it just gives write permission to user and group.  After executing this command  chmod +w testfile.txt   running ls -l testfile.txt prints  -rw-rw-r-- 1 ravi ravi 20 Mar 10 18:09 testfile.txt   but in case of +r and +x it works properly.  I don't want to use chmod ugo+w filename. "The only thing necessary for the triumph of evil is for good men to do nothing." -Edmund Burke  Is there an idiom, phrase or preferably a single word that we can call people that could have helped but didn't? Bystanders don't necessarily have help to give. Cowards aren't particularly helpful either.    Addendum:  For example, once EMS has arrived on scene, bystanders are encouraged not to try to help, unless they're a nurse and therefore have the necessary skills to, and sometimes even then so. If in The Service, I would not want a coward (a liability) next me holding the line. Not to take anything away from these great answers, or to insist on a non-militaristic point of view, I would like to veer into the commercial or civilian realm in which I find this quote most often alluded to, E.G., "If we all gave 5 cents we could cure cancer tomorrow." Pretend most of us did give 5 cents and we did cure cancer, but you didn't give. You are now a(n) ____?... yes, I know what we call them, but what is their proper designation? So I'm using an app that stores images heavily in the DB. What's your outlook on this? I'm more of a type to store the location in the filesystem, than store it directly in the DB.  What do you think are the pros/cons? Can I use two 7805 ICs in parallel to get double current capacity? I use a 7805 for a project where the circuit needs a higher current (~2.8&nbsp;A) at 5&nbsp;V. So I assume that if I use both ICs in parallel I can increase the maximum current capacity. Would it work? Why does friction play the role of centripetal force during the turning of a car? I find it very strange that $$ e^x \geq x^e \, \quad \forall x \in \mathbb{R}^+.$$   I have scratched my head for a long time, but could not find any logical reason. Can anybody explain what is the reason behind the above inequality? I know this is math community, but I'd appreciate a more intuitive explanation than a technical one. Why did Obi-Wan Kenobi choose that moment to appear to Luke? In The Empire Strikes Back, Luke Skywalker violently escapes from the lair of a wampa ice creature, finds himself in the middle of a life-threatening snowstorm on an inhospitable planet, collapses from cold and fatigue, and will likely be dead in a few minutes. As :     Luke lies face down in the snow, nearly unconscious. Slowly he looks   up and sees Ben Kenobi, barely visible through the blowing snow. It is   hard to tell if Kenobi is real or a hallucination.     Why did Obi-Wan Kenobi choose this moment to appear to Luke and deliver rather important instructions concerning next steps in his Jedi training?  It seems lucky that Luke remembered anything of the encounter at all. He probably thought he was hallucinating. Do commuting matrices share the same eigenvectors? In one of my exams I'm asked to prove the following      Suppose $A,B\in \mathbb R^{n\times n}$, and $AB=BA$, then $A,B$ share the same eigenvectors.    My attempt is let $\xi$ be an eigenvector corresponding to $\lambda$ of $A$, then $A\xi=\lambda\xi$, then I want to show $\xi$ is also some eigenvector of $B$ but I get stuck. IN clause and placeholders Replacements for switch statement in Python? How to withdraw your paper from an open access journal where it has been accepted? My paper got accepted in a mediocre open access journal. However later I found out that its publishing fees was too high.   What would be the correct way of asking a withdrawal of your article from the journal? Can we get x comment votes per y minutes, rather than one vote per 5 seconds? I quite often will read a thread of comments, and want to vote up a few of them. I vote one up, read the next few comments, vote up another and get a *giant red box*.  I've seen that "You can only submit a comment vote every 5 seconds" box far too often. Can I vote for 12 comments per minute, rather than 1 comment every 5 seconds? How to integrate mv command after find command? I am searching for files which name which contain AAA within their path using following command:  find path_A -name "*AAA*"   Given the output showed by the above command, I want to move those files into another path, say path_B. Instead of moving those file one by one, can I  optimize the command by moving those files right after the find command? In the ,  can monitor some things like the total traffic on the site. However, it seems to be broken at the moment, all figures are almost zero. This is how it looks for Meta Stack Exchange (other sites show similar pictures):