【发布时间】:2017-05-11 13:31:10
【问题描述】:
我想在 IBM HTTP Server 上的 500 和 503 错误文档上使用自定义页面以及缩短 URL,同时使用重写该代码以缩短 URL (WCS)。
以下是我使用的规则:
RewriteCond %{REQUEST_URI} /en/store(.*)
RewriteRule ^/en/store(.*) $1 [R=301,L]
RewriteCond %{REQUEST_URI} /((?!wcsstore/)(?!search/)(?!cont/)(?!cons/)(?!cs/)(?!wcs/)(?!cache/)(?!webapp/)(?!swagger/)(?!solr/))(.*)
RewriteRule ^/((?!wcsstore/)(?!search/)(?!cont/)(?!cons/)(?!cs/)(?!wcs/)(?!cache/)(?!webapp/)(?!swagger/)(?!solr/))(.*) /webapp/wcs/stores/servlet/en/store/$2 [PT,L]
当我不使用缩短 URL 代码时,ErrorDocument 500 /500.html 自定义页面工作正常。但是当我使用缩短 URL 代码时,ErrorDocument 500 /500.html 自定义页面不起作用。当我使用像 ErrorDocument 500 "Server in a problem so We will be back" 这样的字符串时,无论是使用缩短 URL 代码还是不使用缩短 URL 代码。
【问题讨论】:
-
请在您的问题中添加一个问题。这些规则与主题有什么关系?
-
我想在 IBM HTTP Server 上的 500 和 503 错误文档上使用自定义页面以及缩短 URL 也使用重写该代码以缩短 URL (WCS)
-
当我不使用缩短 URL 代码时,ErrorDocument 500 /500.html 自定义页面工作正常。但是当我使用缩短 URL 代码时,ErrorDocument 500 /500.html 自定义页面不起作用。当我使用像 ErrorDocument 500 "Server in a problem so We will be back" 之类的字符串时,这两种情况都适用,有缩短 URL 代码或没有缩短 URL 代码。
-
格式化为代码块并将 OP 的 cmets 提出问题以帮助解决问题。
标签: mod-rewrite web-applications ibmhttpserver web-administration