Atlassian JIRA的服务台插件门户网站有它丑陋的网址,用户必须记住这个长网址
http://jira.domain.com/servicedesk/customer/portal/1
对于我的用户,我想拥有特殊的域名:
任务不是那么简单,我需要在Apache
中重写urlhttp://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
答案 0 :(得分:1)
我可以想象这样的事情:
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]