Correct urls in both online and local installation

Hello everyone,

I would like to have a bunch of Omeka sites both on local and online installations. The purpose is to test changes in local and then upload the relevant files to the online server.

I configured apache for the local server and I putted a symbolic link in /var/www/html to a folder omeka where I download several omeka sites.

So I have a local structure like this:
/var/www/html/omeka/omeka1
/var/www/html/omeka/omeka2

The sites “Omeka1” and “Omeka2” works. I have access to the remote mysql database. However the links are not working.

Like I copied the websites from the remote server, I have urls pointing to the root folder. For example, I have a menu entry where the url is “http://localhost/items/browse/type/15”. Obviously it doesn’t work because the correct local url should be http://localhost/omeka/omeka1/items/browse/type/15.

I tried to use RewriteBase /omeka/omeka1 in the .htaccess on the local side without success.

Is there a way to have correct urls in both in local and online side?

This issue is still present.

I tried to force the call of the module rewrite by adding:

<IfModule mod_rewrite.c>
RewriteEngine On
</IfModule>

in /etc/apache2/apache2.conf (I did also launch the command a2enmod rewrite in root).

Any idea?

Could you clarify where those URLs are entered? Are they in the Appearance->Navigation settings, or in some customized theme code, for example.

Yes and it is probably the reason for the problem (sorry I didn’t think about that before).

I have customize some navigation entries and I have three types of entries:

Home - url = /
People - url = /references/people (with the reference addon)
Some other entry - url = /items/browse/type/15

It is these urls which are not correct at the local side (because my local installation is inside a folder and http://localhost/references/people, for example, doesn’t find the correct files).

Yes, the different base URLs is likely the problem. Since we’re talking about different settings in different installations, you’ll probably just need to set the navigation URLs separately for the two installations.