Victor Mezrin
Victor Mezrin

Reputation: 2847

phpstorm, subdomain handling

I have a project with some php and html files. URL for this project, for exmaple, - mysite.com

I need to create a subdomain for content, that will be moved to CDN: assets.mysite.com

Now, during development time, all files for subdomain are stored in a subfolder of my project /home/user/phpstormprojects/mysite/assets

In my html/php files I need to specify full path to my assets html://assets.mysite.com/mybest.png

Of cource I want autocompletion and other features to work well. So I need to set up phpstorm smth like "assets.mysite.com" = "/home/user/phpstormprojects/mysite/assets"

Could I do it?

Upvotes: 1

Views: 504

Answers (1)

Ladybugf8
Ladybugf8

Reputation: 26

I am using PhpStorm 7.1.3

  1. Ensure your cursor has highlighted the project name.
  2. At the menu on top select "File" then "New" then "Directory".
  3. Name your directory. It will go under the project name (see step 1).
  4. Right click on the new directory then select "Mark Directory As" a pop-up will appear giving you the option to mark the new directory as "Resource Root".

Put whatever directories you want inside it. PhpStorm will rename all references to them in your code.

Upvotes: 1

Related Questions