Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rewrite Condition Rule for JIRA ServiceDesk

Atlassian JIRA's Service Desk plugin portal has it's ugly url, users must remember this long URL

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

For my users i would like to have special domain :

http://helpdesk.domain.com/

Task is not so simple, i need rewrite url in Apache

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

but need to exclude

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
like image 651
Tim TJey Jun Avatar asked Aug 26 '14 20:08

Tim TJey Jun


1 Answers

I can imagine something like this:

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]
like image 167
Peter Avatar answered Oct 03 '22 19:10

Peter