This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » Url aliases problem
expandshrink

Url aliases problem

Url aliases problem

Friday 19 October 2012 12:42:48 pm - 2 replies

Hi,

I have problem with aliases with paths.
For example I have path domain.com/SomeDir/SomePage, and I'd like to remove SomeDir from path.

It will be domain.com/SomePage. I set up url aliases, so after choosing domain.com/SomePage I see content from domain.com/SomeDir/SomePage, but I don't know how to set up rewrites (in apache .htaccess or in ez Publish), to hide this long paths. When I fetch nodes node.url_alias|ezurl are generated system aliases, not my aliases. 

Regards

Modified on Friday 19 October 2012 12:43:51 pm by Rafał Kostecki

Friday 19 October 2012 2:20:26 pm

Check out the PathPrefix setting in settings/site.ini file:

# Hides this part from the start of the url alias
# If you use this setting, you also need to use the PathPrefix setting in logfile.ini.
PathPrefix=

To remove SomeDir from the url path of a siteaccess, set PathPrefix to "PathPrefix=SomeDir" in the corresponding site.ini.append.php file. But in addition, you should set the entry point of the siteaccess to the node of "SomeDir".

[SiteSettings]
IndexPage=/content/view/full/123
DefaultPage=/content/view/full/123
# 123 = node id of SomeDir
 
[SiteAccessSettings]
PathPrefix=SomeDir

Hope that helps.

Modified on Friday 19 October 2012 2:34:56 pm by Daniel Schreier

Tuesday 10 December 2013 3:56:48 pm

Quote from Daniel Schreier :

Check out the PathPrefix setting in settings/site.ini file:

# Hides this part from the start of the url alias
# If you use this setting, you also need to use the PathPrefix setting in logfile.ini.
PathPrefix=

To remove SomeDir from the url path of a siteaccess, set PathPrefix to "PathPrefix=SomeDir" in the corresponding site.ini.append.php file. But in addition, you should set the entry point of the siteaccess to the node of "SomeDir".

[SiteSettings]
IndexPage=/content/view/full/123
DefaultPage=/content/view/full/123
# 123 = node id of SomeDir
 
[SiteAccessSettings]
PathPrefix=SomeDir

Hope that helps.

Hello , 

 

But in the case  you have to apply this in multiple folders : 

domain.com/SomeDir/SomePage

domain.com/SomeotherDir/SomeotherPage

 

it seems pathprefix can only  be used once in a siteaccess isn't ? 

thanks

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from