Different base /site structure for local dev and live site

Also, the <base> setting for the routing needs to be different on the live server. Is that possible?

This is currently not possible as it means that we have to rewrite all your pages before upload.

It is always wise to have the same site structure and folder organization for local dev and live production.

1 Like

Thanks @George. However, I don’t have the same structure. My localhost config is in a sub-folder but the live site isn’t.

Will you be introducing the facility to handle this in the future? Couldn’t the <base> value be set in an include and the value stored with the target details?

I use WAMP and in the past have created sites in subfolders within the default www folder. I realised this was going to be a problem with the <base> setting and new routing feature, so I changed the structure of a couple of sites I’m working on - creating virtual hosts for each site. Now the local and remote structure is the same and the same <base> setting works for both.

I think this arrangement is probably better generally. I wouldn’t be keen on having different versions for local/remote file, particularly as any mixup would have serious consequences (eg if I wanted to upload some files via FTP rather than with Wappler).

@TomD … can you explain maybe how you created virtual hosts?

Im also running a WAMP localhost…
So when setting up all the routing via LOCALHOST … and then as explained above … all the files are in a subfolder making the < base > url diffrent from the LIVE server. Its a bit of a pain in butt for me at this point of time as I develop all things locally first then transfer it to a live server… and i would hate to copy files over and then have to search and replace tags… then i just want to give up on routing…

So please do share how you created the virtual hosts for each site on WAMP… would be great please.

Localhost Setup — as below — but once you move it to a LIVE server the routing does not work… as above explained by @sitestreet


@TomD @sitestreet @George

Ok i have found how to add a virtual host. Thanks for the help. you have saved me alot of time and worries.

(I’ve just noticed your last post. I’ll send what I had started anyway, in case it helps.)

You can create virtual hosts via MAMP:


… or you can edit the httpd-vhosts.conf file directly. I usually do this - just copying and editing the last virtual host settings.

It’s also necessary to edit your hosts file:

1 Like