Password Protect folder in AppFog

You won’t know the location of the .htpasswd file in AppFog. Hence you won’t be able to password protect folders in the normal way. To password protect folders in AppFog you should use a different way. You should add the following location of .htpasswd instead of the full location. If the full location is : /home/simsu/projects/TestPalace/Blog/Password_Protect/.htpasswd The Location of .htpasswd in .htaccess deployed in AppFog should be : ../app/Blog/Password_Protect/.htpasswd If the file is on the root directory, then the location would be : .

[READ MORE]

How to redirect users to a page in PHP

If you want to redirect users to a specific page or url like when user is not logged in or something in PHP then you can accomplish this with header function or by Javascript printed by echo function. The following example will redirect user to http://subins.hp.af.cm Or you can use the normal Javascript : window.location=’http://subins.hp.af.cm’;”; ? What’s the difference ? header function is called in server itself not when the page reaches the browser.

[READ MORE]