Suggestion: Absolute URLs in mappings

Currently, a subdirectory of the root can only be mapped to a relative directory of the main project settings.  The project I'm working on has a root project path, but several of the subdirectories represent virtual hosts.  The root of the project doesn't actually have a URL at all.  This allows various aspects of the site to utilize a single codebase without duplication.

e.g.

/root/
/root/etc/
/root/lib/
/root/www/  -> http://www.example.com/
/root/ui/  -> http://ui.example.com/

0
4 comments

Hi signe,

AFAIK you can setup such mappings right now in File | Settings | Deployment (select deployment profile) | Mappings -- I believe this is what you need.

If that cannot do what you want -- then can you please give us more details (if available): an example of what are you trying to achieve (where and how do you want these mappings to be used)?

0

That's actually the dialog I'm talking about.

The Connections tab defines the root URL for the project
The Mappings tab specifically says "Web path: relative to web server root URL: http://www.example.com/"

You can only see the example Project URL in the mappings tab if you have a single mapping, but if you use a full URL in the "Web path on server" field, it shows you a URL like this:

"http://www.example.com/http://www.example.com/"

(root URL + the URL you just added) - attached screenshot



Attachment(s):
mappings.png
0

Yep, my mistake. Somehow I was sure that this would work just fine (I was confused with another tool I have "touched" recently -- it had quite similar layout/interface -- possibly some custom plugin, do not remember as it was not on my computer).

I would definitely like to have it implemented in PhpStorm.

0

Please sign in to leave a comment.