的.htaccess - 隐藏PHP的GET变量 [英] .htaccess - hide php get variables

查看:485
本文介绍了的.htaccess - 隐藏PHP的GET变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个,我想重写网址的网页。然而,约1小时后谷歌上搜索,并在这里的,我无法找到任何东西,因为做给我,因此,是行不通的。

I have a webpage that I would like to rewrite the URL to. However, after about 1 hour of searching on Google and here, I couldn't find anything that made since to me, therefore, wouldn't work.

目前的网站:www.example.com/page1/page2?var=1

Current Website: www.example.com/page1/page2?var=1

我想,改变为www.example.com/page1/page2/1

I want that changed to www.example.com/page1/page2/1

任何帮助将AP preciated!

Any help will be appreciated!

谢谢

ZG

推荐答案

你总是在URI两部分组成?如果是这样,创建一个的.htaccess 文件是这样的:

Do you always have two components in the URI? If so, create an .htaccess file like this:

RewriteModule On
RewriteRule ^(.*)/(.*)/(.*)$ /$1/$2?var=$3

这篇关于的.htaccess - 隐藏PHP的GET变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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