我的.htaccess中有以下规则:
Options -Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule ^ - [F]
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteRule ^(.*)$ https://domain.com/$1 [R=301,L]
RewriteCond %{THE_REQUEST} \s/modules/([^\s]+)\s [NC]
RewriteRule ^ %1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ /modules/$1 [L,QSA]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [L]
// domain.com/*hidden*modules/thefolder/file.php?id=12345
RewriteRule ^thefolder/file/([^/]+)/ /file?id=$1 [NC]
我已经尝试添加执行此操作的规则(最后一个网址)但不知何故它不使用上面的代码应用它。什么阻止它工作?
除了最后一条规则之外,所有其他规则都没有任何问题。
答案 0 :(得分:2)
尝试使用此规则您缺少dialog dialog;
DialogText dialogText ;
DialogButton dialogButton;
DialogField dialogFieldI, dialogFieldII;
str fieldDel, confirm;
MyTableDelete tabledelete;
dialog = new Dialog("Dialog name");
dialog.addText("Write to confirm");
dialog.addText("DELETE");
dialogFieldI = dialog.addFieldValue(extendedTypeStr(String30), fieldDel , "Insert value");
dialogFieldII = dialog.addFieldValue(extendedTypeStr(String30), confirm, "Confirm delete");
dialog.run();
confirm = dialogFieldIi.value();
fieldDel = dialogFieldI.value();
if(dialog.closedOk() )
{
if(confirm == "DELETE")
{
ttsBegin;
select forUpdate tableDelete
where tableDelete.field == fieldDel;
tableDelete.delete();
ttsCommit;
}
}
.php