Page 1 of 1

Link issue

PostPosted: 07. July 2012 01:06
by Flea
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. :?

Re: Link issue

PostPosted: 07. July 2012 01:18
by Geri
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.

Re: Link issue

PostPosted: 07. July 2012 01:44
by Altrea
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

Re: Link issue

PostPosted: 07. July 2012 23:29
by Flea
Geri,
Thanks for the quick answer and yes it is a prober DNS, I mean I pay good money for this… lol.

Re: Link issue

PostPosted: 07. July 2012 23:43
by Flea
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.