gpt4 book ai didi

apache - 为 JIRA ServiceDesk 重写条件规则

转载 作者:行者123 更新时间:2023-12-04 12:53:51 24 4
gpt4 key购买 nike

Atlassian JIRA 的 Service Desk 插件门户有一个丑陋的 URL,用户必须记住这个长 URL

http://jira.domain.com/servicedesk/customer/portal/1

对于我的用户,我想要一个特殊的域:

http://helpdesk.domain.com/

任务没那么简单,我需要在Apache中重写url

http://helpdesk.domain.com/ --- > http://jira.domain.com/servicedesk/customer/portal/1

但需要排除
http://helpdesk.domain.com/s/files.css ---> http://jira.domain.com/s/files.css
http://helpdesk.domain.com/rest/myjson ---> http://jira.domain.com/rest/myjson
http://helpdesk.domain.com/secure/some.html ---> http://jira.domain.com/secure/some.html

最佳答案

我可以想象这样的事情:

RewriteCond   %{REQUEST_URI}  !/helpdesk.domain.com/s/files.css 
RewriteCond %{REQUEST_URI} !/helpdesk.domain.com/rest/myjson
ReWriteCond %{REQUEST_URI} !/helpdesk.domain.com/secure/some.html
RewriteCond %{HTTP_HOST} ^(www\.)?helpdesk\.domain\.com [NC]
RewriteRule ^(.*)$ http://jira.domain.com/servicedesk/customer/portal/1/$1 [R=301,NC,L]

关于apache - 为 JIRA ServiceDesk 重写条件规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25514617/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com