logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: rewrite and $_GET Page Previous  1, 2
Author
nitesh.apte



Joined: 25 Aug 2010
Posts: 21
Location: India

PostPosted: Mon 30 Aug '10 13:15    Post subject: Reply with quote

I did var_dump($_SERVER) in PHP. And QUERY_STRING was empty.
Back to top
nitesh.apte



Joined: 25 Aug 2010
Posts: 21
Location: India

PostPosted: Thu 02 Sep '10 8:27    Post subject: Reply with quote

If you guys can help me out then it will be great. I am not an apache expert. I have always used XAMPP, in which I never did any configuration. Let me know where I am making mistake. Because I really need to make this work as I have a large project in PHP.
Back to top
nitesh.apte



Joined: 25 Aug 2010
Posts: 21
Location: India

PostPosted: Thu 02 Sep '10 21:27    Post subject: Reply with quote

Hi Guys,
I made it work. I still don't know what the problem was but I am getting my desired result. What I did - I created the virtual host and everything worked as expected.
So, the thing is still don't know what happened when I browsed like http://localhost/myproject and www.myproject.com. If you guys can tell me why this kind of stuff happen, it'll be very helpful.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7445
Location: EU, Germany, Next to Hamburg

PostPosted: Fri 03 Sep '10 9:58    Post subject: Reply with quote

You want to get the same page from localhost and www.myproject.com. Only from your computer or over the web?

First you can use this in your vhost
ServerName localhost
ServerAlias www.myproject.com

If it is only on your computer you can edit the hosts file in C:\Windows\System32\drivers\etc\

Code:

127.0.0.1       localhost
127.0.0.1       www.myproject.com
Back to top
nitesh.apte



Joined: 25 Aug 2010
Posts: 21
Location: India

PostPosted: Fri 03 Sep '10 11:05    Post subject: Reply with quote

Yes, I wanted the very same thing on localhost and www.myproject.com(virtual host). Everything working fine after creating virtual host but not as localhost. I did created vhost as you have described. But worked on virtual host only.
Back to top


Reply to topic   Topic: rewrite and $_GET View previous topic :: View next topic
Post new topic   Forum Index -> Apache Page Previous  1, 2