rewrite url using htaccess file?

丶灬走出姿态 提交于 2019-12-06 11:35:46

Answer to my own question !! This works for url rewriting !!

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

You could do this:

rewriteRule ^(.*)$ $1.php [NC]

Edit: I see your rewrite rule is exactly the same. What problem do you have?

Sounds like mod_rewrite is not installed at all. Check apache documentation, link.

Sorry, brief answer... this link might also help you out, could be a few things and as mentioned the rewrite looks fine, so try and see if any of the following work.

http://www.wallpaperama.com/forums/how-to-fix-mod-rewrite-500-internal-server-error-on-htaccess-file-apache-t718.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!