Valentine Gifts For Him - Travel news - Air Jordans - Discount Perfume - Debt Consolidation

PDA

View Full Version : .htaccess on localhost


anton-io!
Apr 7th 2005, 10:47 pm
Hello!

I am running the .htaccess file online on the server - no problems there ...

My problem is when I try to run it on localhost ... nothing ...

PHP code/MySQL everything else is great

Here's a sample of the server version .htaccess file ...

Options +FollowSymLinks
rewriteEngine on
rewriteBase /
RewriteCond %{HTTP_HOST} ^h**p://www.somethingseomething.com/
RewriteRule ^(.*)\.htm$ /view-this.php?UID=$1 [L]
... etc ...

this works great on the server ... on the localhost, I changed

RewriteCond %{HTTP_HOST} ^h**p://www.somethingseomething.com/
to
RewriteCond %{HTTP_HOST} ^h**p://localhost/something

nothing ...

I'm using Sokkit (should really not make a difference), PHP, etc ...

any ideas - thanks greatly!

johnt
Apr 8th 2005, 1:27 am
I think that localhost can actually get translated into different values of HTTP_HOST - the local IP address, the machine name if you have one assigned, etc.

Try not specifying the host, as you know its going to be localhost on your machine, right?

You could maybe try
RewriteCond %{HTTP_HOST} ^.*$
and see if that works.

Hope it helps

John

expat
Apr 8th 2005, 2:03 am
whats you localhost? Sure you run apache?

RewriteCond %{HTTP_HOST} ^h**p://something

should work
Expat

NetworkTown.Net
Feb 6th 2007, 10:09 am
I am using xampp (apache) localhost and .htaccess dose not work on it too.