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
Asked
Active
Viewed 308 times
1 Answers
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