Copiing the database from local to production server I noted a different behaviour in pointing the images using the relative URL.
In detai,l if in a page i want to refer an image that is in the \public\u1 folder i need to use :

/public/u1/Wi_Soul_logo.jpg

in my production server (a Linux server)

and

/ecopercorsi//public/u1/Wi_Soul_logo.jpg

in my Windows local server ("ecopercorsi" is the folder where drupal "index,php" is installed)

How can I configure my local server in order to have the same page in both servers?

Thanks
Marcello

Comments

arh1’s picture

i avoid this problem by making sure my dev, staging, live sites are peers of each other. e.g. if my live site is at http://example.com i set up http://dev.example.com on my local dev server using an Apache virtual host. then all my "root relative" content paths (like your /public/u1/Wi_Soul_logo.jpg example above) work in both environments, and the database is easily portable between hosts.

i described my process in node 192169 recently -- not sure how it would differ for Windows, though.

hth

gmitchel850’s picture

I use a similar maneuver.

I have http://example.com for the site becomes http://example.local on the development machine.

As already mentioned, that keeps everything that is relative to the root consistent.

I do have folders outside of the Web structure for things like downloadable content with UberCart. When migrating from development to server, you have to update those manually, since they are not simply relative URL links. They are hard-coded in the configuration of Drupal modules.

Cheers,

Mitch

jonfhancock’s picture

It would probably benefit you to run linux on your local machine, and run apache from there. It's super easy and fun with Ubuntu.

Plus, you'll learn more about how the server really works internally.