Check whether request is coming from frontend or backend.
if(Mage::app()->getStore()->isAdmin() && Mage::getDesign()->getArea() == 'adminhtml'){ //request is from backend/admin } else { //request is NOT from backend/admin }
Changing the Admin URL: Open the /app/etc/local.xml
file, locate the <frontName>
tag, and change the ‘admin’ part it to something a lot more random.