Page 1 of 1

Rewrite URL and server path from htaccess

Posted: 17 Jan 2019, 12:20
by truefriend-cz
I have problem with compatibility Mantis and .htaccess file for rewriting subdomain to directory

If have .htaccess in the root file for rewrite URL subdomain to directory:
My domain is http://bugs.domain.tld
and system path for Mantis is /etc/apache2/www/root/bugs

.htaccess:

Code: Select all

# subdomain to directory
RewriteCond %{HTTP_HOST} !^www\.domain\.tld$
RewriteCond %{HTTP_HOST} ^(\w+)\.domain\.tld$
RewriteCond %{REQUEST_URI}:%1 !^/([^/]+)/([^:]*):\1
RewriteRule ^(.*)$ /%1/$1 [QSA]
then on the webpage Mantis systemhave URLs for click ("a href" in html code) in format http://bugs.domain.tld/bugs/bug_report_page.php

i wanted domain in format http://bugs.domain.tld/bug_report_page.php

How i can removing bugs/ from URL?
Thanks