GET,URL重写 [英] GET, URL-Rewrite

查看:153
本文介绍了GET,URL重写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

继续我以前的主题: GET,if,elseif

我正在使用CMS,但它通过文件在某处存在URL重写。
如何让$ _GET在不带.php扩展名的情况下工作?

I'm using a CMS but it has URL rewrite somewhere through the files. How would I go around getting the $_GET to work without the .php extension?

Options +MultiViews

这仍然不会让我访问/something.php它说没有找到。 (这是因为页面不在/中,它们在使用模板系统的另一个目录中?

That still won't let me visit /something.php it says not found. (Would it be because the pages aren't in /, they are in another directory using a template system?

推荐答案

正在使用apache HTTP服务器,那么你应该考虑使用 multiview选项
不需要使用 RewriteRule
在htaccess文件中,添加:

If you are using apache HTTP server, then you should consider to use multiview option. No need to use RewriteRule there. In the htaccess file, add :

Options +MultiViews

这篇关于GET,URL重写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆