redirect incoming traffic to alias location

Problems with the Windows version of XAMPP, questions, comments, and anything related.

redirect incoming traffic to alias location

Postby dboulton » 30. March 2011 07:44

I'm using xampp to create a intranet site for a wireless network. I have the wifi network set up to point incoming connections a windows machine running xampp.

I have the site files in a folder C:/xampp/test and I created an alias called TestAlias to point to this folder. I confirmed it is working locally on the xampp machine (http://localhost/TestAlias points to the correct website files located in the test folder).

I tried editing the index.php file in the htdocs folder:
Code: Select all
//header('Location: '.$uri.'/xampp/');
   header('Location: '.$uri.'/TestAlias/test/index.htm');
   

this does not work but most likely I am doing something wrong. Can anyone enlighten me on how I might get this working? Sorry if this is a noob question but I just started development on this yesterday and this is my first time working with xampp.
dboulton
 
Posts: 3
Joined: 30. March 2011 07:25

Re: redirect incoming traffic to alias location

Postby Sharley » 30. March 2011 07:58

Code: Select all
header('Location: '.$uri.'/TestAlias/index.htm');
May be try this as you have already told Apache that TestAlias should point to the test folder.
Code: Select all
header('Location: '.$uri.'/TestAlias');
may also work.

Perhaps paste here the Alias directive, also which configuration file did you put your TestAlias directive?

Some useful examples for Alias directives are in \xampp\apache\conf\extra\httpd-xampp.conf file especially the Webalizer Alias which has its folder outside the htdocs folder.

If all else fails include the full URI in the index.php file and see if it helps.

The \xampp\apache\logs\error.log file may also hold clues.

Good luck and best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: redirect incoming traffic to alias location

Postby dboulton » 30. March 2011 08:21

Sharley wrote:
Code: Select all
header('Location: '.$uri.'/TestAlias');

That worked!! I guess completing the url in the header doesnt work but putting the alias only works. Now when I connect from another machine on the network it points me to Http://TestAlias/ and displays all the right stuff. Thanks a bunch consider this issue solved.
dboulton
 
Posts: 3
Joined: 30. March 2011 07:25


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 31 guests