简体   繁体   English

帮助mod_rewrite

[英]Help with mod_rewrite

Should request: site.ru/index.php?go=23&page=bla alter the form: bla.site.ru/index.php?go=23 应该请求: site.ru/index.php?go=23&page=bla更改以下形式: bla.site.ru/index.php?go=23

That is, the user types in browser bla.site.ru/index.php?go=23 and all information is passed to scripts that request site.ru/index.php?go=23&page=bla 也就是说,用户在浏览器bla.site.ru/index.php?go=23中输入内容 ,所有信息均传递到请求site.ru/index.php?go=23&page=bla的脚本中

It is prohibited to use redirect 禁止使用重定向

Try this: 尝试这个:

RewriteCond %{HTTP_HOST} ^([^.]+)\.example\.com$
RewriteRule ^ http://example.com%{REQUEST_URI}?page=%1 [L,QSA]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM