Link issue

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

Link issue

Postby Flea » 07. July 2012 01:06

Good morning/afternoon all,
Well this is the first time I have joined a forum normally I just read them to get my answers. But I am not even sure how to search for this issue and I have read many posts. I recently installed XAMMP (by the way it’s brilliant). But come across the following issue and I am sure it’s something I have done or not done for that matter. Ok here is my issue, if I want to go into a directory within a published page I get a 404 error. To explain better I have a directory in htdocs called “test” and another subdirectory with in the test directory called “admin”. Setup my DNS on my hosting page to go to <IP Address>/test and pointed it to www.mydomain.com . Now if I type into my web browser www.mydomain.com I get redirected to <IP Address>/test without any problems. However if I enter www.mydomain.com/admin I get a 404 error. Now if I type my external <IP Address>/test/admin into the web browser it works fine and calls an index.php page as per plan. I have read information on sub domains, rewrite modules, .htaccess files, and ports on the firewall. But nothing seems to resolve my issue. If there already is information in regards to this kind of issue I apologize, but when I do a search nothing seems to relate to this. Any information or help would be appreciated. :?
Flea
 
Posts: 3
Joined: 07. July 2012 00:15
Location: Perth Western Australia
Operating System: Windows server 2003 SP 2

Re: Link issue

Postby Geri » 07. July 2012 01:18

are you sure you are using a real dns? maybe its just some redirect that redirects the browser to the specified site. if so, you would unable to use file paths in the domain.
Geri
 
Posts: 20
Joined: 02. August 2011 14:10
Operating System: linux

Re: Link issue

Postby Altrea » 07. July 2012 01:44

Hi Flea,

first of all, it would be better if you add some paragraphs in your post for a better readability.

relating to your problem:
A DNS (Domain Name System) should and can do just one thing: It gets a request with a domain name and send back an IP Address for it, if the Domain is configurated. A DNS don't do something like subfolder rewriting.

What you should do is to build a VHost on your XAMPP Apache which is matching exactly to this domain name. This VHost can have an own DocumentRoot Path placed to your /test subfolder.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Link issue

Postby Flea » 07. July 2012 23:29

Geri,
Thanks for the quick answer and yes it is a prober DNS, I mean I pay good money for this… lol.
Flea
 
Posts: 3
Joined: 07. July 2012 00:15
Location: Perth Western Australia
Operating System: Windows server 2003 SP 2

Re: Link issue

Postby Flea » 07. July 2012 23:43

Altrea,

I will take note on the paragraphs and thank you for the quick reply.

I have created a VHost as per your suggestion yesterday and my www.mydomain.com gets redirected to the hosted page as it should. But still have the same issue once I try to go to a sub folder I get a 404 error, i.e. www.mydomian.com/test.

However I have only played around with the VHost for a few hours yesterday and as you mentioned in your reply about subfolder rewrite may have a look at that a little further since this has come up a few time in my searches and something tell me it is related to it somehow. I have a week off work next week so will dedicate my time to that. Once I find my problem will posted it here.
Flea
 
Posts: 3
Joined: 07. July 2012 00:15
Location: Perth Western Australia
Operating System: Windows server 2003 SP 2


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 47 guests