Skip to content

Instantly share code, notes, and snippets.

@tallesairan
Created May 25, 2021 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tallesairan/1f54de8ce590118e9ffe704c61c8e035 to your computer and use it in GitHub Desktop.
Save tallesairan/1f54de8ce590118e9ffe704c61c8e035 to your computer and use it in GitHub Desktop.
rewrite all html files to php
RewriteEngine on
RewriteBase "/"
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ $1.php?%{QUERY_STRING} [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*$ index.php [L]
@tallesairan
Copy link
Author

ren *.html *.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment