Skip to main content
GrN.dk

Main navigation

  • Articles
  • Contact
  • Your Digital Project Manager
  • About Greg Nowak
  • Services
  • Portfolio
  • Container
    • Excel Freelancer
    • Kubuntu - tips and tricks
    • Linux Apache MySQL and PHP
    • News
    • Image Gallery
User account menu
  • Log in

Breadcrumb

  1. Home

routing

By Greg Nowak, 6 November, 2020

PHP Test If Front Page: Safer Homepage Detection

Need to detect the homepage in plain PHP? Start with $_SERVER['REQUEST_URI'], compare the parsed path instead of the raw request string, and normalize subfolder installs so the check survives real production URLs.

Tags

  • php
  • programming
  • routing
  • web development
routing

Review Greg on Google

Greg Nowak Google Reviews

 

  • PHP Test If Front Page: Safer Homepage Detection
  • Scraping Tools and Browser Automation for Modern Teams
  • PHP Only on the Front Page
  • WordPress Security Releases Still Need an Ops Runbook
  • MySQL 8 Support for Drupal 7: Fixing the NO_AUTO_CREATE_USER Error
RSS feed

GrN.dk web platforms, web optimization, data analysis, data handling and logistics.