由网友(丶Mr丨内涵)分享简介:我有我的小网站存在的一个问题,这个问题是关于URL。这是我的网址:http://example.com/by_location_directory_list_3.aspx?page=2 和我的PHP脚本,我想告诉它从 $获取数据_ GET [页码] 我必须做些什么,有什么东西,没有一个人的作品,任何人能帮助我吗?...
我有我的小网站存在的一个问题,这个问题是关于URL。这是我的网址:
http://example.com/by_location_directory_list_3.aspx?page=2
和我的PHP脚本,我想告诉它从 $获取数据_ GET [页码]
我必须做些什么,有什么东西,没有一个人的作品,任何人能帮助我吗?
这是 .HTACESS
文件
< IfModule mod_rewrite.c>
RewriteEngine叙述上
重写规则^ _ by_location_directory_list(。*) ASPX $的template.php选项=的directory_list和放大器;?位置=位置和ID = $ 1 [L]
选项所有-Indexes
< / IfModule>
在PHP脚本
如果(空($ _ GET ['页'])!){回声这在$ _GET [页码]页(S); }
解决方案
使用的QSA标签,查询字符串追加
:[QSA,L]
这意志,如果present,追加URL的现有的查询字符串重定向之一。
i have One problem on my small sites, the problem is on the URL. this is my URL :
http://example.com/by_location_directory_list_3.aspx?page=2
And on my PHP script, i want to show a data where it gets from $_GET[page]
i have do something, and something, no one works, any someone can help me?
this is .HTACESS
file
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^by_location_directory_list_(.*).aspx$ template.php?option=directory_list&location=location&id=$1 [L]
Options All -Indexes
</IfModule>
the PHP script is
if(!empty($_GET['page'])){ echo "this on $_GET[page] page(s) "; }
解决方案
Use the QSA-tag, Query String Append
: [QSA,L]
This will, if present, append the existing query string of the url to the redirected one.
相关推荐
最新文章