Home page redirect...can't get it to work

Moderator: crythias

Locked
kevinbednar
Znuny newbie
Posts: 15
Joined: 20 Jul 2011, 16:55
Znuny Version: 3.0.9
Real Name: Kevin Bednar

Home page redirect...can't get it to work

Post by kevinbednar »

Hey all, running the latest 3.1b2 version on Centos. I want to set it so that when a customer goes to http://support.domain.com it automatically takes them to support.domain.com/otrs/customer.pl. I've read through the various postings in the forums for different versions but nothing seems to work. One references the otrs.conf file but that doesn't even exist in my install. Not sure if an .htaccess file can be used to do a rewrite, but if it can I have no idea where it needs to be placed since there are no vhosts defined in the httpd.conf file so I'm not even sure where anything is aliased or placed. It seems like this is a common problem and an FAQ on it someplace would be great. If anyone has an instructions on how to do this in the latest version I would appreciate it. TIA all.

Kevin
Marwain
Znuny newbie
Posts: 16
Joined: 13 Nov 2011, 21:08
Znuny Version: 3.0

Re: Home page redirect...can't get it to work

Post by Marwain »

Make sure you have mod_rewrite installed along with Apache. In the root folder of the domain web, place .htaccess file with following content:

Code: Select all

RewriteEngine on
RewriteRule index\.html /otrs/customer.pl
OTRS 3.0.11, Centos 6.0 x64, MySQL/MSSQL
kevinbednar
Znuny newbie
Posts: 15
Joined: 20 Jul 2011, 16:55
Znuny Version: 3.0.9
Real Name: Kevin Bednar

Re: Home page redirect...can't get it to work

Post by kevinbednar »

Thanks Marwain, but where is the default domain? /var/www/html is empty and is the default doc root in httpd.conf, so I'm not sure what OTRS considers the default doc root/page?

Kevin
Marwain
Znuny newbie
Posts: 16
Joined: 13 Nov 2011, 21:08
Znuny Version: 3.0

Re: Home page redirect...can't get it to work

Post by Marwain »

Yes, /var/www/html is the default location for Apache htdocs. You can try creating a "index.html" file with some test content and then access it using your browser to check if that's the location.

The definition for the OTRS aliases is in /etc/httpd (in RHEL distros) or in /etc/apache[2] (in Debian distros) in some otrs.conf file or so.
OTRS 3.0.11, Centos 6.0 x64, MySQL/MSSQL
kevinbednar
Znuny newbie
Posts: 15
Joined: 20 Jul 2011, 16:55
Znuny Version: 3.0.9
Real Name: Kevin Bednar

Re: Home page redirect...can't get it to work

Post by kevinbednar »

Thanks, I'll give it a try and see how I make out!

Kevin
kevinbednar
Znuny newbie
Posts: 15
Joined: 20 Jul 2011, 16:55
Znuny Version: 3.0.9
Real Name: Kevin Bednar

Re: Home page redirect...can't get it to work

Post by kevinbednar »

Ok, I created an index.html in /var/www/html and all i put in it was some text. Then created an .htaccess file (also in /var/www/html) with what you said, restarted apache but all it does is show the text inside the index.html. :( mod_rewrite IS listed as being loaded in apache. Am I missing something? Perhaps I need to allow override for the default dir?
kevinbednar
Znuny newbie
Posts: 15
Joined: 20 Jul 2011, 16:55
Znuny Version: 3.0.9
Real Name: Kevin Bednar

Re: Home page redirect...can't get it to work

Post by kevinbednar »

Answered my own question. I DID need to allow overrides on the doc directory. Once I did that and restarted everything started working. Thanks for your help Marwain!

Kevin
Marwain
Znuny newbie
Posts: 16
Joined: 13 Nov 2011, 21:08
Znuny Version: 3.0

Re: Home page redirect...can't get it to work

Post by Marwain »

glad to help
OTRS 3.0.11, Centos 6.0 x64, MySQL/MSSQL
Locked