0

What is the syntax to mod_rewrite "ONE file" from .php to .html in .htaccess? I have syntax for ALL files, but how do I do that for one file? Thanks

Doktorek
  • 1
  • 1

1 Answers1

0

In htaccess in the document root :

RewriteEngine on


RewriteRule ^file.php$ /file.html [L]

This will internally map /file.php to /file.html

Amit Verma
  • 40,709
  • 21
  • 93
  • 115
  • That didnt work. I put "RewriteRule ^upload.php$ /upload.html [L]" It just give me : Multiple Choices The document name you requested (/upload.html) could not be found on this server. However, we found documents with names similar to the one you requested. Available documents: /upload.php (common basename) – Doktorek Feb 22 '17 at 16:31