4

I have just setup my website locally so I can test my pages more easily.

Eclipse has been configured to use an XAMPP server locally.

The problem is that I want to map my project to a certain place in my website.

ie. In my Eclipse PHP project I have a folder called

com

I want this to map to

/com

in the webstie.

I tried to do this in the mapping section of the Eclipse server setup but it didn't work. When I type

http://localhost/com/

It should go to my project folder, however, when I type other folder it should use the normal website folders.

how can I do this?

3
  • I'd make it virtual hosts, not folders Commented Jun 12, 2010 at 10:24
  • Are virtual hosts a better option that what I proposed below? Commented Jun 12, 2010 at 15:21
  • @jax: Not always / really. It is an alternative way to solve the problem, but it's not that quickly to setup and it has more implication on network configuration if you're in a LAN. So virtual hosts tend to be more inflexible as long as you don't have an admin that you can push to do things for you ;) Commented Jul 14, 2011 at 8:49

2 Answers 2

3

Well I edited the apache httpd.conf file like this and it works.

#Alias for com folder
Alias /com C:\PHP\workspace-php\php_project\com
<Directory "C:\PHP\workspace-php\php_project\com">
   Options Indexes FollowSymLinks MultiViews ExecCGI
   AllowOverride All
   Order allow,deny
   Allow from all
</Directory>
Sign up to request clarification or add additional context in comments.

Comments

0

I'd created my Eclipse workspace exactly on [xampp]\htdocs folder

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.