WampServer loads my remote site, not local files

Running WampServer on a Windows 7 platform, I can't access my local files.  Instead of loading localhost, WampServer loads my remote-hosted site pages.  The last time I used WampServer was months ago, and it worked correctly.  I've made changes to the system since then, and don't know what went wrong.
ddantesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
How are you trying to access localhost?
Have you made any changes to your hosts file to do any redirects?
0
ddantesAuthor Commented:
Thank you for your comment.  I try to access localhost by directing my browser to http://localhost/ 

Yesterday,  I modified .htaccess to perform some redirects.  However, if I remove .htaccess from my local folder and my server, the behavior doesn't change.
0
GaryCommented:
What is it you are loading locally - WP, Joomla or something similar? There may be a redirect happening because the base url is set to your live site
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

ddantesAuthor Commented:
I was mistaken about .htaccess -- it is causing this issue.  I modified it yesterday to redirect certain requests.  The pre-modification version allows WampServer to connect to localhost.  Can you advise me what I should change in .htaccess so that the redirect remains effective, and localhost is also accessible?  Here is the code which I added yesterday:

# redirect requests with www prefix
RewriteEngine on
RewriteCond %{HTTP_HOST} !^mauitradewinds.com [NC]
RewriteRule ^/?(.*)$ http://mauitradewinds.com/$1 [L,R=301]

RewriteEngine On
RewriteBase /

# redirect index.htm to the root domain
RewriteRule ^index\.htm$ / [NC,R,L]
0
GaryCommented:
That redirects everything that doesn't start with mauitradewinds.com
Try
RewriteCond %{HTTP_HOST} !^localhost
RewriteCond %{HTTP_HOST} !^mauitradewinds.com [NC]
RewriteRule ^/?(.*)$ http://mauitradewinds.com/$1 [L,R=301]1

Open in new window

0
ddantesAuthor Commented:
I get an error: RewriteRule: bad flag delimiters

Here is the revised .htaccess code:

# redirect requests with www prefix
RewriteEngine on
RewriteCond %{HTTP_HOST} !^localhost
RewriteCond %{HTTP_HOST} !^mauitradewinds.com [NC]
RewriteRule ^/?(.*)$ http://mauitradewinds.com/$1 [L,R=301]1

# redirect index.htm to the root domain
RewriteEngine On
RewriteBase /
RewriteRule ^index\.htm$ / [NC,R,L]
0
GaryCommented:
Remove the 1 at the end
RewriteRule ^/?(.*)$ http://mauitradewinds.com/$1 [L,R=301]1
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.