kennySystemExit
kennySystemExit

Reputation: 329

.htaccess for redirecting to localhost project root

I have my PHP localhost project in folder named myproject in XAMPP localhost directory. Inside this project I need to use some hyperlinks, for example:

<a href="/">Home</a>

if I am on:

http://localhost/myproject/something

On production server this get me to the root of project (home), but on localhost I get:

http://localhost/xampp/

instead of

http://localhost/myproject

How can I do this? I guess it will be something with .htaccess file. Thank you for advice

Upvotes: 0

Views: 1071

Answers (1)

toto21
toto21

Reputation: 612

Search in your httpd.conf xampp and replace by myproject and restart your web server :

DocumentRoot "C:/.../xampp/.."

and <Directory "C:/..../xampp/../"> ...

Upvotes: 1

Related Questions