Tim*_*Jun 7 apache rewrite jira
Atlassian JIRA的Service Desk插件门户网站有它丑陋的URL,用户必须记住这个长URL
http://jira.domain.com/servicedesk/customer/portal/1
对于我的用户,我想有一个特殊的域名:
任务不是那么简单,我需要在Apache中重写url
http://helpdesk.domain.com/ --- > http://jira.domain.com/servicedesk/customer/portal/1
Run Code Online (Sandbox Code Playgroud)
但需要排除
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
Run Code Online (Sandbox Code Playgroud)
我可以想象这样的事情:
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]
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1398 次 |
| 最近记录: |