-1

I have a website running on Apache.

I would like to create a forward such that if I access http://helpdesk.example.com/otrs/anyname (except customer.pl) this redirects to http://helpdesk.example.com/otrs/customer.pl

Also I'd like to not show the path of the website in the URL:

helpdesk.example.com/otrs/customer.pl displayed as helpdesk.example.com.


Thank you for answers..

Some is wrong...

in var/www/ is index.html

<meta http-equiv="refresh" content="0;url=http://helpdesk.example.com/otrs/customer.pl">

and at this moment is .htaccess

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^/(.*)$ ./customer.pl?query=$1
enter code here

It isn't working...

Sven
  • 100,763

1 Answers1

0

You might set up an .htaccess file with something similar to the following:

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^/(.*)$ ./customer.pl?query=$1

The RewriteCond %{SCRIPT_FILENAME} !-d and RewriteCond %{SCRIPT_FILENAME} !-f are included to avoid redirecting files that do exist such as CSS, JS, or images.

More information is here.

pcnate
  • 101