Skip to content

Instantly share code, notes, and snippets.

@mokoshalb
Created May 3, 2020 12:29
Show Gist options
  • Save mokoshalb/2d34e565c2a2d1cf78d280fea2a1c9e9 to your computer and use it in GitHub Desktop.
Save mokoshalb/2d34e565c2a2d1cf78d280fea2a1c9e9 to your computer and use it in GitHub Desktop.
HTACCESS script to rewrite base URL like WordPress permalink.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?id=$1 [QSA,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment