Blog: 2023-06-14

From razwiki
Revision as of 22:40, 13 June 2023 by Razzi (talk | contribs) (Created page with "Got php redirects to work, what a hassle... Solution was to put the following in <code>/etc/apache2/sites-available/000-default.conf</code>: <pre> RewriteEngine On Rewri...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Got php redirects to work, what a hassle...

Solution was to put the following in /etc/apache2/sites-available/000-default.conf:

  RewriteEngine On
  RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
  RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}\.php -f
  RewriteRule ^(.*)$ $1.php [L]