how to redirect localhost to localhost:1337

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

how to redirect localhost to localhost:1337

Postby talpazzo » 29. October 2014 11:51

Hi everybody,
I have a little problem with a plugin I'm using on Wordpress on my localhost.
Everything work great except this plugin.

My website it's under "http://localhost:1337/mywebsite" and when I'm trying to use this plugin (it's an import plugin for importing XML) it opens "http://localhost/" and the port it's missing, so nothing will work and I have to put manually ":1337".

There is a way to always redirect "http://localhost/" to "http://localhost:1337/"?
Should I do something else to fix this problem?

Thank you very much, Diego
talpazzo
 
Posts: 2
Joined: 29. October 2014 11:45
Operating System: Windows 7 64

Re: how to redirect localhost to localhost:1337

Postby Altrea » 29. October 2014 12:33

You should ask the developer of this specific plugin.
In many cases it is a simple configuration issue.
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: how to redirect localhost to localhost:1337

Postby Nobbie » 29. October 2014 12:36

talpazzo wrote:There is a way to always redirect "http://localhost/" to "http://localhost:1337/"?


No, as http://localhost does not reach your Apache anyway, so "nobody" can change Port 80 to 1337. Nobody is listening to Port 80 (or simply the wrong software is listening). This is one of the major disadvantages of using a different Port then 80 for Apache (i do not recommend that).

You may be lucky if "localhost" is not hardcoded in the WordPress plugin, but instead taken from Server Variables of HTTP Request. Be sure to set "ServerName" in http.conf to "localhost:1337" instead of only "localhost". Change that (if necessary), restart Apache and try again - maybe WordPress will address now correctly to localhost:1337. If not, there is no solution other than editing the source code of WordPress and/or the Plugin.

Also, if you were asked for the Domain Name in WordPress installation, you also MUST enter localhost:1337 instead of only localhost.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: how to redirect localhost to localhost:1337

Postby talpazzo » 29. October 2014 15:52

Nobbie wrote:No, as http://localhost does not reach your Apache anyway, so "nobody" can change Port 80 to 1337. Nobody is listening to Port 80 (or simply the wrong software is listening). This is one of the major disadvantages of using a different Port then 80 for Apache (i do not recommend that).


Thank you Nobbie,
I changed everything back to 80 and modify the programs port using 80 so there is not conflict.
Now my website runs under "http://localhost/mywebsite" and no problem with the plugin.

Have a nice day, Diego
talpazzo
 
Posts: 2
Joined: 29. October 2014 11:45
Operating System: Windows 7 64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 88 guests