我有一个类似于example.com/index.php?p=testPHP 的URL将使用加载测试变量$_GET['p'].URL已经可以简化为example.com?p=test; 不过,我希望在我简化了这个.htaccess来site.com/test.我该怎么做呢?
我正在尝试使用webRequest API来更改网页上加载的.swf文件...该页面加载了一个名为chat.swf的文件,但我想重定向到同一目录中的chat2.swf以便使用其他文件.我被告知这可行,但我不知道如何正确使用此API,我找不到任何示例@ _ @
function incerceptChat(chat){
console.log( "onBeforeRequest", details );
if(chat.url == swf1){
chat = swf2;
}
}
Run Code Online (Sandbox Code Playgroud)
这是我的功能,它应该改变URL,但我无法让它工作(可能在某处错误的语法......)我正在用它来听:
chrome.experimental.webRequest.onBeforeRequrest.addListener(interceptChat, {"redirectUrl": chat});
Run Code Online (Sandbox Code Playgroud)