eZ Community » Forums » General » ezurl - get rid of ezpublish_legacy...
expandshrink

ezurl - get rid of ezpublish_legacy Subdir from url path

ezurl - get rid of ezpublish_legacy Subdir from url path

Thursday 18 December 2014 10:56:06 pm - 3 replies

Hi there,

I've installed the legacy stack as standalone from inside the ezpublish_legacy subdirectory. With a rewrite rule from the root's .htaccess, managed to load the site index form the subdir. All the pages of the site can be reached in both ways by calling them with or without the ezpublish_legacy part of the url (http://www.domain.it/ezpublish_legacy/eng/nodename or http://www.domain.it/eng/nodename).I just would be happy to get rid of the ezpublish_legacy dir from all the site's links where ezurl() has been applied. Is there a proper way to accomplish this? Thanks in advance!

Modified on Thursday 18 December 2014 10:58:51 pm by Lo' F.

Friday 19 December 2014 3:30:25 am

Hello Lo' F,

If your only using eZ Publish Legacy then you should strongly consider pointing your web server virtual host configuration's document root to the ezpublish_legacy directory directly.

If for some reason your using the new stack (or need it specifically) then ... you must have a configuration problem (in new stack and or legacy) as what you describe should not normally be happening. Specifically speaking the directory name should not be within the urls generated by ezurl :\

Sorry I don't know enough new stack just yet to know what configuration you might have missed.

Perhaps others could chime in here happy.gif Emoticon

I hope this helps!

Cheers,
Heath 

Saturday 20 December 2014 12:30:05 am

Hi Heath! Thank you again for getting back to my ez issues...

I've made the domain to point to ezpublish_legacy subdir by a rule in the root's .htaccess this way

RewriteEngine on
 
RewriteRule ^(.*)$ /ezpublish_legacy/$1 [PT,L,QSA]

Isn't that enough? Well, if the physical ezpublish_legacy directory should not be in the url returned by the ezurl operator, when the web server resolves to that directory as root, probably not. ;(

In the beginning I think I was trying to handle this configuration from the conf/vhost.conf file this way

<VirtualHost x.xxx.xxx.xxx>  
 DocumentRoot "/var/www/vhosts/domain.it/httpdocs/ezpublish_legacy"
</VirtualHost>

but couldn't succeed (..yes, restarted the httpd service) so I fell back on the .htaccess solution.

My ez publish version is Community Project 2014.7

Modified on Saturday 20 December 2014 12:31:32 am by Lo' F.

Saturday 20 December 2014 5:22:20 am

Hello Lo' F,

First, thank you for sharing more information about your setup, this really helps clarify what is going on.

There are a number of factors involved with how you (and others) should setup eZ Publish in the web server config, etc depending on if you use the new stack (at all) or legacy only.

For a legacy only (my recommendation to you based on what you have shared) setup

Your web server virtual host configuration's document root must point directly to the ezpublish_legacy directory. If your having problems with this share more information and lets talk through your problems, lets just not give up and use your invalid .htaccess rule configuration. 

Simply put your .htaccess rules are wrong. They are (in large part) the cause of your problems (mainly because all urls are redirected in a way which results in putting the ezpublish_legacy directory into the url. You should only be using the default .htaccess rules provided by eZ Publish (remember to rename the file of course).

https://github.com/ezsystems/ezpublish-legacy/blob/master/.htaccess_root

Lets have you make these changes, test again for possible further problems and then go from there.

Best wishes happy.gif Emoticon

Cheers,
Heath 

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from