how to change otrs as another name in URL

English! place to talk about development, programming and coding
Post Reply
sunil2012
Znuny newbie
Posts: 23
Joined: 04 Jan 2013, 12:05
Znuny Version: 3.0.10

how to change otrs as another name in URL

Post by sunil2012 »

I want to change "otrs" to "mycrm" in the url. Currently it is http://127.0.0.1/otrs/index.pl but I want this as http://127.0.0.1/mycrm/index.pl.
I tried but didn't find any solution regarding the same. Please suggest if anybody know the same.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: how to change otrs as another name in URL

Post by reneeb »

You have to configure the webbrowser and change the Kernel/Config.pm: Add

Code: Select all

$Self->{ScriptAlias} = 'mycrm/';
to Config.pm and change

Code: Select all

ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/"
to

Code: Select all

ScriptAlias /mycrm/ "/opt/otrs/bin/cgi-bin/"
in the apache config...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Huwiseg
Znuny newbie
Posts: 61
Joined: 19 Jun 2013, 11:12
Znuny Version: 3.2.4

Re: how to change otrs as another name in URL

Post by Huwiseg »

Ist also possible to remove the Folder / Alias? We want to use just h t t p : / /domainname.tld/

I dont think that $Self->{ScriptAlias} = ''; and ScriptAlias / "/opt/otrs/bin/cgi-bin/" will work.
rentier
Znuny newbie
Posts: 14
Joined: 23 Nov 2012, 16:42
Znuny Version: 2.4.9

Re: how to change otrs as another name in URL

Post by rentier »

Hi,

here you go, please ask if you have problems because I copied only the config parts that I changed

Code: Select all

# SysConfig
ScriptAlias = ""

Code: Select all

# Apache

Alias /otrs-web/ /opt/otrs/var/httpd/htdocs/
ScriptAliasMatch ^/(.*)\.pl /opt/otrs/bin/cgi-bin/$1.pl

RewriteEngine On

# Rewrite the start page to the customer frontend
RewriteCond %{REQUEST_URI} ^(/)?$
RewriteRule ^(.*)$ /customer.pl [PT,L]

# Rewrite old style URLs to new URLs
RewriteRule ^/otrs/(.*)$ /$1 [R=301,L]

<LocationMatch ^/.*\.pl>
  ErrorDocument 403 /index.pl
  SetHandler  perl-script
  PerlResponseHandler ModPerl::Registry
  Options +ExecCGI
  PerlOptions +ParseHeaders
  PerlOptions +SetupEnv
  Order allow,deny
  Allow from all
</LocationMatch>
Huwiseg
Znuny newbie
Posts: 61
Joined: 19 Jun 2013, 11:12
Znuny Version: 3.2.4

Re: how to change otrs as another name in URL

Post by Huwiseg »

This Works! very nice, thank you very much!

When opening the url, ill get the agent interface, the nicest way would be that there is the customer login. I see there is a rewrite option for it and i added it, rewrite is enabled and apache restart but it wont work for now hm.
rentier
Znuny newbie
Posts: 14
Joined: 23 Nov 2012, 16:42
Znuny Version: 2.4.9

Re: how to change otrs as another name in URL

Post by rentier »

Hmmmm, try this Rewrite instead of the two lines that I gave you:

Code: Select all

RewriteRule ^(/)?$ /customer.pl [PT,L]
This does nothing different though, only saves a line.
Maybe you have something from the default config in there, the RewriteRule works fine on my system. I also have additional Rewrites before those that rewrite internal Proxy IPs to the agent frontend.

Edit: Maybe you are confused because the Rewrite those a PT (PassThrough), meaning it will proxy it internally. It won't redirect to the /customer.pl but will show the content of it.
Huwiseg
Znuny newbie
Posts: 61
Joined: 19 Jun 2013, 11:12
Znuny Version: 3.2.4

Re: how to change otrs as another name in URL

Post by Huwiseg »

Im still getting just the Agent interface using http : / / ipaddress or http : / / ipaddress /
Post Reply