如何避免使用url重写破坏TinyMCE弹出窗口?

时间:2022-12-20 19:19:55

I have a website which uses TinyMCE textboxes for editing. It works fine except for the toolbar options which open a popup window as it seems to be caught by my url rewriting in the .htaccess file. Each of them show my 404-page. The url rewriting is set up so that all urls (except ajax calls) are sent to an index.php file. It seems obvious that the popup windows are caught by this as well but I have no idea what url signatrues to look for in the .htaccess file, so do anyone know what kind of pattern I can match against?

我有一个使用TinyMCE文本框进行编辑的网站。它工作正常,除了打开弹出窗口的工具栏选项,因为它似乎被我在.htaccess文件中重写的URL捕获。每个都显示我的404页。设置url重写,以便将所有url(ajax调用除外)发送到index.php文件。很明显弹出窗口也是由此捕获的,但我不知道在.htaccess文件中要查找的url signatrues,所以有谁知道我可以匹配哪种模式?

2 个解决方案

#1


As @andyk pointed out, you can use a .htaccess in your TinyMCE folder to override the global settings that are doing the URL rewriting. I've done this in the past myself to resolve the same issue.

正如@andyk指出的那样,您可以在TinyMCE文件夹中使用.htaccess来覆盖正在进行URL重写的全局设置。我过去自己这样做是为了解决同样的问题。

If that's not attractive to you for whatever reason, the other option is to exclude the tinyMCE folder like so:

如果由于某种原因这对你没有吸引力,另一个选择是排除tinyMCE文件夹,如下所示:

# if URL starts with /TinyMCE, stop processing here
RewriteCond %{REQUEST_URI} ^/TinyMCE [NC]
RewriteRule .* - [L]

This sets a rewrite condition to check for the directory TinyMCE is in, and if found, the rule .* - means for all URLS, do nothing and the [L] means stop processing here.

这设置了重写条件以检查TinyMCE所在的目录,如果找到,则规则。* - 表示所有URL,不执行任何操作,[L]表示此处停止处理。

#2


try putting an exception in your htaccess for the tinyMCE folder maybe ?

尝试在你的htaccess中为tinyMCE文件夹添加一个例外吗?

#1


As @andyk pointed out, you can use a .htaccess in your TinyMCE folder to override the global settings that are doing the URL rewriting. I've done this in the past myself to resolve the same issue.

正如@andyk指出的那样,您可以在TinyMCE文件夹中使用.htaccess来覆盖正在进行URL重写的全局设置。我过去自己这样做是为了解决同样的问题。

If that's not attractive to you for whatever reason, the other option is to exclude the tinyMCE folder like so:

如果由于某种原因这对你没有吸引力,另一个选择是排除tinyMCE文件夹,如下所示:

# if URL starts with /TinyMCE, stop processing here
RewriteCond %{REQUEST_URI} ^/TinyMCE [NC]
RewriteRule .* - [L]

This sets a rewrite condition to check for the directory TinyMCE is in, and if found, the rule .* - means for all URLS, do nothing and the [L] means stop processing here.

这设置了重写条件以检查TinyMCE所在的目录,如果找到,则规则。* - 表示所有URL,不执行任何操作,[L]表示此处停止处理。

#2


try putting an exception in your htaccess for the tinyMCE folder maybe ?

尝试在你的htaccess中为tinyMCE文件夹添加一个例外吗?