@muriel.schmidt
To remove the file extensions .php or .html using .htaccess, you can use the following code in your .htaccess file:
For removing .php extension:
1 2 3 |
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^.]+)$ $1.php [NC,L] |
For removing .html extension:
1 2 3 |
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^.]+)$ $1.html [NC,L] |
Make sure to save the changes and upload the .htaccess file to the root directory of your website. This code will remove the specified file extensions from URLs in your website.