下面是我当前的.htaccess code
Here is my current .htaccess code
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^.]+)$ $1.php [NC,L]
它只能在删除扩展名为.php
it is works only in removing .php extension
从
的http://localhost/mysite/news.php类= CAT1和ID = 1
至
的http://本地主机/ mysite的/新闻/ CAT1 / 1 /
和
http://localhost/mysite/news.php?category=cat1&year=2011&month=10&day=25&id=1
至
的http://本地主机/ mysite的/新闻/ 2011/10月25日/ 1
如何写完整的.htaccess的干净以上网址?
How to write complete .htaccess for the clean url above?
试试这个
的RewriteRule ^(。*) / $ $ 1.PHP [NC]
例如
http://www.exapmle.com/contact-us/