After adding the htaccess code for hiding .php extention I am getting internal server error on some mobile devices.
Could not identify the error, since it works fine in PC and other smartphones.
Tried cache clearing and all but some new devices also have the same issue.
Here is my code:
RewriteBase /
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
# Run Php without filename extension
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php
# Return 404 if original request is .php
RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$"
RewriteRule .* - [L,R=404]
Found issue in smartphone browsers when loading my page, but is some phones and pc it works
https://example.com/samplepage
Aucun commentaire:
Enregistrer un commentaire