htaccess - 将流量从一个 URL 重定向到另一个 URL
任何人都可以建议我如何将以下路径的任何流量重定向到另一个目录,
images/flash/main.swf?config=/flash/flash_output/133/location.htm
这应该 301 重定向到另一个 URL(例如 www.site.com)
我遇到的问题是?导致 Codeigniter(版本 2)出现问题的字符,因为这会导致以下错误 - 您提交的 URI 包含不允许的字符。 我正在尝试使用 htaccess 文件而不是 codeigniter 中的路由选项来解决该问题。
我当前允许的 uri 字符配置如下(标准设置)
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
- 我不想添加 ?出于安全考虑,如果可能的话,请在此进行(文档指出不应更改)
Can anyone suggest how I can redirect any traffic the following path to another directory
images/flash/main.swf?config=/flash/flash_output/133/location.htm
this should 301 redirect to another URL (eg www.site.com)
The issue I get is the ? character which causes a problem with Codeigniter (version 2), as this causes the following error - The URI you submitted has disallowed characters.
I am trying to use the htaccess file rather than the routes option in codeigniter to remedy the problem.
My current permitted uri chars config is below (the standard setting)
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
- I don't want to add the ? to this if possible here due to security concerns (the documentation states that this should not be changed)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设
images
是documentroot
中存在的目录,将其添加到
DocumentRoot
中的.htaccess
中Assuming that
images
is a directory present indocumentroot
Add this to your
.htaccess
inDocumentRoot