Web Site Link Redirects me to XAMPP Page. Why?

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

Web Site Link Redirects me to XAMPP Page. Why?

Postby jlgoinggreen » 13. March 2013 15:20

Hi,
When I click on my website's link I am being redirected to the XAMPP page. Also if I type http://localhost I am being redirected to the XAMPP page instead of my website's page.

How do I fix this?
jlgoinggreen
 
Posts: 11
Joined: 11. March 2013 20:30
Operating System: Windows 7

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby jlgoinggreen » 13. March 2013 15:30

Hi,
I just read where someone on here asked a similar question and was told the question was in the wrong forum. My XAMPP page is coming up when I type localhost, so from what I read I am having a WordPress issue and not an XAMPP issue. I will direct my question to the WordPress forum.

I also just read you guys are volunteers. I'd like to take the time to thank you for your time and helping us out. Your time is appreciated! Thank you!!!
jlgoinggreen
 
Posts: 11
Joined: 11. March 2013 20:30
Operating System: Windows 7

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby reaser » 13. March 2013 15:34

Did you ever fix this? I'm having the same thing happen and i"m not using wordpress. My folder is in htdocs and when i type help.mydomain.com it shows the xampp page.
reaser
 
Posts: 5
Joined: 13. March 2013 15:24
Operating System: server 2008

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby WilliL » 13. March 2013 15:37

Hi,
in the directory 'http://localhost' (means filefolder 'C:\xampp\htdocs', if you installed XAMPP as recommanded) there is a index.htm which redirects you. Rename it.
Willi
WilliL
 
Posts: 660
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby reaser » 13. March 2013 15:43

I did the default install for xampp so i assume that is the recommended. Default install folder c:\xampp and have my files located in c:\xampp\htdocs\helpdesk. Even after completely removed the index.html file I now get index of / and it looks like it is the contents of the c:\xampp\htdocs folder.

I have installed xampp before and had this working just find and for some reason can't seem to figure out the little thing i'm missing to make this work.
reaser
 
Posts: 5
Joined: 13. March 2013 15:24
Operating System: server 2008

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby Altrea » 13. March 2013 15:52

WilliL wrote:Hi,
in the directory 'http://localhost' (means filefolder 'C:\xampp\htdocs', if you installed XAMPP as recommanded) there is a index.htm which redirects you. Rename it.

No, the index.php file contains the redirect
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: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby jlgoinggreen » 13. March 2013 16:01

No, I have not been able to correct this issue. I typed my request to WordPress and for some reason someone deleted it. :/

Altrea, if you're not too busy and do not mind, can you help us? I'm assuming you mean the index.php in the XAMPP file. How do I redirect in the index.php? What and where should I type in? I am totally new to all of this.
jlgoinggreen
 
Posts: 11
Joined: 11. March 2013 20:30
Operating System: Windows 7

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby reaser » 13. March 2013 16:01

Doesn't matter if you change name of the index.php or index.html. Even with renaming them I think you still need to add the virtual host which is what I was overlooking. I have added the vritual host information to the c:\xampp\apache\conf\extras\httpd-vhosts.conf file. My site is now coming up when I type help.mydomain.com
reaser
 
Posts: 5
Joined: 13. March 2013 15:24
Operating System: server 2008

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby reaser » 13. March 2013 16:06

Unless someone else corrects me as being wrong I think this is a 2 step process.
First - rename the index.php and/or index.html. I renamed both as I wasn't sure which one is the actual redirect
Second - navigate to your xampp install folder (mine was default c:\xampp)
Go to \xampp\apache\conf\extras\ and open httpd-vhosts.conf
On the very last line enter the following but change the names to fit your install

<VirtualHost *:80>
ServerName www.yourdomain.com
ServerAlias yourdomain.com
DocumentRoot c:/xampp/htdocs/yourfoldername
</VirtualHost>

I've done this, restarted apache and now can connect by help.mydomain.com
reaser
 
Posts: 5
Joined: 13. March 2013 15:24
Operating System: server 2008

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby jlgoinggreen » 13. March 2013 16:15

Thank you reaser, rename the index.php/index.html to what?
jlgoinggreen
 
Posts: 11
Joined: 11. March 2013 20:30
Operating System: Windows 7

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby Altrea » 13. March 2013 17:14

jlgoinggreen wrote:Thank you reaser, rename the index.php/index.html to what?

Rename to something else.

reaser wrote:I renamed both as I wasn't sure which one is the actual redirect

Simply take a look at these two files in your code editor and you will see that the HTML file doesn't contain anything that can do a redirect
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: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby JonB » 13. March 2013 19:12

The issue is the order in which Apache processes index files (or default.htm etc). XAMPP has a default order, that is set in httpd.conf.

If you have both a index.php and an index.html file in the same root folder, unless you change the order - the index.php files will always be served first. This only applies when you do not specify the page to be served in teh URL - such as
Code: Select all
 www.mysillydomain.com


Code: Select all
<IfModule dir_module>
    DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \
                   default.php default.pl default.cgi default.asp default.shtml default.html default.htm \
                   home.php home.pl home.cgi home.asp home.shtml home.html home.htm
</IfModule>


IF you are running vhosts, you can make the same changes individually by vhost, or change it in httpd.conf and it is global

http://httpd.apache.org/docs/2.4/mod/mod_dir.html

Good Luck
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 134 guests