Reputation: 13
When running a project in PhpStorm it takes me to localhost:63342/MyProject/index.php but this breaks all of the links because it adds the project name to the URL of my links work because on the domain it they are all mysite.com/image1.jpg, mysite.com/file2.htm, etc...
Is there a way to make it run the project as http://localhost:63342/index.php instead of http://localhost:63342/MyProject/index.php.
I've tried everything I can think of but I can't seem to figure this one out. I must be missing something.
Upvotes: 1
Views: 1245
Reputation: 165088
You cannot do http://localhost:63342/index.php
-- only http://MyProject:63342/index.php
(IDE still needs to know what site/files to serve somehow). For that:
Edit your hosts
file (or local DNS server, if preferred and have one) and point MyProject
to your computer's IP.
Create Deployment entry of correct type (In Place
should do), configure it (provide desired URL etc -- http://MyProject:63342/
) and mark it as Default for this project -- now IDE will use URL from there when generating "open in browser" URLs.
Upvotes: 3