由网友(笑拥冷风)分享简介:我的网址,目前这样的:My urls are currently like:/events.html/contact.html /events.html/contact.html我想要做的是,他们重定向到一个PHP得到变量。What I want to do is, redirect them to a p...
我的网址,目前这样的:
My urls are currently like:
/events.html /contact.html
/events.html /contact.html
我想要做的是,他们重定向到一个PHP得到变量。
What I want to do is, redirect them to a php get variable.
例如events.html =的index.php?网页=事件
E.g events.html = index.php?page=events
在如何可以实现任何想法?
Any ideas on how this could be accomplished?
多谢了。
推荐答案
您正在寻找的 的mod_rewrite
这里。
You are looking for mod_rewrite
here.
通过沿线的规则的东西(假设mod_rewrite的已安装并启用,你把它放在.htaccess文件)
With the rule something along the lines of (assuming mod_rewrite is installed and enabled and you're putting it in a .htaccess file)
RewriteEngine on
RewriteRule ^/(.*).html /index.php?page=$1
相关推荐
最新文章