Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 8th May 2013, 15:34
Zerogiven Zerogiven is offline
Junior Member
Join Date: Apr 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Redirect an alias domain to a php script


I have a tiny problem with my alias domains...

I created one for a website which should redirect to a script at the main page.

For example...

Website: http://www.mywebsite.de/
Alias: http://my-other-domain.de/

So, the alias should redirect to: http://www.mywebsite.de/nanana/my_script.php

So if i create my alias with these settings:
Redirect Type: R=301, L
Redirect Path: http://www.mywebsite.de/nanana/my_script.php

It looks almost fine, but if i call http://my-other-domain.de/ it redirects to http://www.mywebsite.de/nanana/my_script.php/ (look at the last "/" which i did not set at the redirect path)

It always append a "/"

Is there any way where it will not append it?
Cause with my actual .htaccess the script fails with a leading slash.

At the moment i have a "stupid" solution where it redirects two times. First from the alias into a directory and from there it redirects with php to the script i want.

Would be nice if anyone can help me how not to redirect two times

Reply With Quote
Sponsored Links
Old 8th May 2013, 16:03
till till is offline
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts

The redirect function is only for directory redirects, so you can not use that for files.

You can create a file redirect by using a .htaccess file in the website, so just add the aliasdomain and do not configure a redirect in ispconfig and then put a .htaccess file in the web directory of the site which dcontains a rewrite rule to forward the requests to your php file like many cms systems do it.
Till Brehm
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot login to phpmyadmin penkku HOWTO-Related Questions 1 24th February 2011 10:26
Apache not restart after change php mode wiss Installation/Configuration 15 3rd November 2010 16:43
Problem with services!! banzaiwebstudio.com Installation/Configuration 7 19th May 2010 22:13
php eating cpu shajazzi Server Operation 15 15th August 2007 02:19
Virtual Hosting Not Working stirfry Installation/Configuration 26 7th August 2007 11:53

All times are GMT +2. The time now is 21:34.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.