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.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th May 2013, 14: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

Hi!

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

greetings
Chris
Reply With Quote
Sponsored Links
  #2  
Old 8th May 2013, 15:03
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,409
Thanks: 834
Thanked 5,496 Times in 4,326 Posts
 
Default

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
Reply

Bookmarks

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 09:26
Apache not restart after change php mode wiss Installation/Configuration 15 3rd November 2010 15:43
Problem with services!! banzaiwebstudio.com Installation/Configuration 7 19th May 2010 21:13
php eating cpu shajazzi Server Operation 15 15th August 2007 01:19
Virtual Hosting Not Working stirfry Installation/Configuration 26 7th August 2007 10:53


All times are GMT +2. The time now is 14:28.


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