I have a website that is hosted on Godaddy server. For SEO I have made all the rule free from .php extension. for url rewrite i am using .htaccess
file
.htaccess
file is running fine on local server that is XAMPP, but on live server (godaddy server ) it is not working.
I have no idea about .htaccess
file code
.htaccess
file content is
RewriteEngine On
Options +MultiViews
i have found answer myself
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
## hide .php extension
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L,NC]
## To internally redirect /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [L]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With