An HTACCESS file is used by an Apache web server to provide instructions for different directories of a website. The .htaccess file can define the index page of a directory, specify the 404 error page...
An HTACCESS file is used by an Apache web server to provide instructions for different directories of a website. The .htaccess file can define the index page of a directory, specify the 404 error page, and more.
To remove the .php extension from yoursite.com/wallpaper.php to yoursite.com/wallpaper, add this code inside the .htaccess file: RewriteEngine On, RewriteCond %{REQUEST_FILENAME} !-f, RewriteRule ^([^\.]+)$ $1.php [NC,L]. To remove .html extensions, change $1.php to $1.html.
To associate file extensions with MIME types, use: AddType video/mp4 mp4 m4v f4v f4p. This associates mp4, m4v, f4v, and f4p extensions with the video/mp4 MIME type.
To enable a PHP extension within .htaccess, use: php_value extension=php_soap.so. This enables the php_soap.so extension.
Sometimes PHP files don’t have .php extensions. To serve them, the web server needs to know they are PHP.