Local dev environment Win10/XAMPP

I have a number of local websites in my htdocs folder (eg. MyTestSite) that I access by visiting localhost/MyTestSite these work fine.

So today I restored a (Joomla 2.5.6) site from a live environment to my local pc (htdocs/3i). I visited localhost/3i expecting to see my new website, but instead the address bar immediately changed to http://www.localhost/xampp/ which took me to my Welcome to XAMPP for Windows! page.

Now if I type www.localhost/3i I can see my homepage, but none of the other links work, they take me straight back to www.localhost/xampp/

I assumed this had something to do with my .htaccess file (which is below) however I can't see anything that may be causing this, although I'm no htaccess expert!

1 Answer 1


An .htaccess file from a live environment may contain many directives that cannot work in another environment, especially a localhost environment.

In your case, I would guess to look for the # RewriteBase /, that according to your root directory localhost/3i, it should be:

# RewriteBase /3i.


Actually, it needs to be uncommented like: RewriteBase /3i, with no #.

Also I don't have experience with XAMPP for Windows, but it sounds a bit strange to me that you can reach your localhost using the www domain. Review this particular .htaccess to see if there are any redirections of non www to www.

Check in htaccess for something like below, and comment it out:

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Generally, if you can't make things work:

  • Disable SEF and Rewrite settings in Joomla Global Configuration
  • Totally remove (or backup) current .htaccess, and simply use Joomla's default one - if this is needed in your current local setup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.