Skip to content

Instantly share code, notes, and snippets.

@atikju
Created April 16, 2021 02:05
Show Gist options
  • Save atikju/dd11561c6cdec5c08ba2fe69a2b3b427 to your computer and use it in GitHub Desktop.
Save atikju/dd11561c6cdec5c08ba2fe69a2b3b427 to your computer and use it in GitHub Desktop.
force all urls to use one file and get last segment of url
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [PT,L,QSA]
$url = $_SERVER['REQUEST_URI'];
$queueID = basename(parse_url($url, PHP_URL_PATH));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment