Page 1 of 1

win7+xampp1.8.1 localhost/monsite imposs remove ports [Solve

PostPosted: 01. March 2013 12:39
by greenfairy
with windows7 and xampp1.8.1 http://localhost:8484/mysite works ! (php/sql/mydamin .....everything works!)
I change the ports ... not only the Apache server, everything works fine,
but impossible to operate: http://localhost/mysite removing ports: 8484 ...

Is that quelq'un has an idea?
(Sorry I'm french my english is bad)

I already tried:
C:\Windows\System32\drivers\etc\hosts

127.0.0.1 localhost
127.0.0.1:8484 localhost

(I tried with my local private ip)

apache ... \conf\httpd.conf (properly configured Listen 8484)
... apache conf\extra\httpd-vhosts.conf (properly configured )

<VirtualHost *:8484>
DocumentRoot "E :/..../xampp/htdocs/"
ServerName localhost
ServerAlias ​​localhost
<Directory "E :/..../xampp/htdocs/">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow, deny
Allow from all
DirectoryIndex index.html index.php
</ Directory>
</ VirtualHost>

to a file. htaccess (E :/..../xampp/htdocs)
and finally to a file. htaccess (E :/..../xampp/htdocs/mysite)

RewriteEngine on
RewriteCond% {SERVER_PORT} ^ $ 8484
RewriteRule ^ (. *) Http://% {SERVER_NAME}% {REQUEST_URI}

when I asked the url http://localhost:8484/mysite url is rewritten in http://localhost/mysite

the url is redirected correctly but nothing is displayed (there is an index.html page in the directory)

Is that quelq'un has an idea?
(Sorry I'm french my english is bad)

Re: win7+xampp1.8.1 localhost/monsite impossible to remove p

PostPosted: 01. March 2013 13:16
by Altrea
Hi greenfairy,

greenfairy wrote:I change the ports ... not only the Apache server, everything works fine,
but impossible to operate: http://localhost/mysite removing ports: 8484 ...

Is that quelq'un has an idea?

Simple answer: you can't. If you don't specify a port in the url, the port will be specified by the protocol. http:// has the default port 80.
If you want to get rid of the port in your http url, you have to use port 80.

best wishes,
Altrea

Re: win7+xampp1.8.1 localhost/monsite impossible to remove p

PostPosted: 04. March 2013 08:41
by greenfairy
@ Altrea, thank you for your answer ...

I now set the "main port" apache on 80 and actually
I can access my sites with http://localhost/mysite ...

why make it simple when you can make it complicated? (lol)