Hi,
How do you specify a link on your server
E.g. I want my demo and production system hosted at
http://localhost/demo http://localhost/production
to point to a file in sites/all/files/myfile.html
I have tried
/sites/all/files/myfile.html - invalid URL sites/all/files/myfile.html - evaluates to ?q=sites/all/files/myfile.html
I guess I am asking can you enter some magic value to do this e.g. <drupal_root>/sites/all/files/myfile.html
These files will move host and have a different lead directory
Iain
Assuming you are using Apache, you should instead use name-based virtual hosts http://httpd.apache.org/docs/2.2/vhosts/
That way you can have
http://demo.localhost http://production.localhost
and the paths will be preserved.
Carl Wiedemann Website design and development consulting carl.wiedemann@gmail.com | skype: c4rlww
On 27/09/11 04:09, Carl Wiedemann wrote:
Assuming you are using Apache, you should instead use name-based virtual hosts http://httpd.apache.org/docs/2.2/vhosts/
That way you can have
http://demo.localhost http://production.localhost
and the paths will be preserved.
Carl Wiedemann Website design and development consulting carl.wiedemann@gmail.com mailto:carl.wiedemann@gmail.com | skype: c4rlww
It might be I am not have misunderstood the link field type or your answer but would't I have to enter http://demo.localhost/sites/all/files/mylink.html and this would break when I export and import the database onto production. What I wanted was to enter an internal link with out the hosthame.
Hope this makes sense. Iain
On 27/09/2011 7:12 a.m., Iain william Wiseman wrote:
On 27/09/11 04:09, Carl Wiedemann wrote:
Assuming you are using Apache, you should instead use name-based virtual hosts http://httpd.apache.org/docs/2.2/vhosts/
That way you can have
http://demo.localhost http://production.localhost
and the paths will be preserved.
Carl Wiedemann Website design and development consulting carl.wiedemann@gmail.com mailto:carl.wiedemann@gmail.com | skype: c4rlww
It might be I am not have misunderstood the link field type or your answer but would't I have to enter http://demo.localhost/sites/all/files/mylink.html and this would break when I export and import the database onto production. What I wanted was to enter an internal link with out the hosthame.
Hope this makes sense. Iain
Solved it, not satisfactory but solved it.
If you create a text field you can put in
<a href="sites/default/files/myInternalLink.html">My Link</a>
It would be nicer if this could be entered in the Link Field. Or again I might have missed something about the link field.
Iain
I'm looking at doing some work on a IndieCommerce website. Have not worked with them before, I'm told the client is insisting on using this company for hosting. Anyone have experience with them? Any feedback would be most appreciated, either on or off list, w/e.
Thanks in advance, Marty
If you setup the virtual hosts, all your paths are identical regardless of the domain. Link field should be able to handle this just fine.
Carl Wiedemann Website design and development consulting carl.wiedemann@gmail.com | skype: c4rlww
On 27/09/2011 10:23 a.m., Carl Wiedemann wrote:
If you setup the virtual hosts, all your paths are identical regardless of the domain. Link field should be able to handle this just fine.
Carl Wiedemann Website design and development consulting carl.wiedemann@gmail.com mailto:carl.wiedemann@gmail.com | skype: c4rlww
Thanks Carl still struggling
In the link field it expects a URL e.g.
http://demo.localhost/fred.html
Are you saying the protocol and host are ignored by drupal?
If they are not then I cannot see how this solves my problem and it is probably my lack of apache knowledge.
I currently have two virtual site
I want to put in a link field into a content type to point to the document fred.html
If I enter
fred.html
in the link field create content for the content type the link goes to
http://myIP1/?q=fred.html on one box http://myIP2/?q=fred.html on the other box
Which of course fail because I want no ?q= in the link. What I want is
http://myIP1/fred.html on one box http://myIP2/fred.html on the other box
Are you say if I enter the server in the link this will automatically be removed?
I.e. if I don't enter fred.html but instead enter http://myIP1/fred.html it will work on http://myIP2? When exported and imported into the second site?
Thanks for your patience
Iain
Do you have Clean URLs enabled? It seems necessary to avoid the q?= problem (possibly a bug in the module).
Carl Wiedemann Website design and development consulting carl.wiedemann@gmail.com | skype: c4rlww
On 27/09/2011 11:47 a.m., Carl Wiedemann wrote:
Do you have Clean URLs enabled? It seems necessary to avoid the q?= problem (possibly a bug in the module).
Carl Wiedemann Website design and development consulting carl.wiedemann@gmail.com mailto:carl.wiedemann@gmail.com | skype: c4rlww
No I do not, I suspect this is my problem but it is quite a big site now so I am loathed to change much before it goes live. I have contemplated writing a wrapper for the thing which provides the link widget. Something which allows you to specify internal link but figured others must have this problem before.
Iain