Reputation: 33
This is my Htaccess file:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
It's just delete the .php from the URL but when I go to mydomain.com/index (index.php) or mydomain.com/ it's show me 404 error, why is that?
Upvotes: 0
Views: 102
Reputation: 1
I found this little piece of Code. You should change yourfile.html to the name of your Index Filename.
DirectoryIndex yourfile.html
Upvotes: -3