MODX Community

Friendly URL's - Issue with URL

Anyone having an issue with Freindly URL’s? I’m using Modx Revolution 2.7.1, I’ve set the Use Friendly URL’s to Yes and the Use Friendly Alias Path to Yes but still having issues.

When I try to connect to a child page like so, www.domainname.com/parent/child.html, it automatically redirects me to www.domainname.com/child.html

I need to be able to see the full address, as 2 pages have the same name but I can’t do that if I can’t see the parent. It gives the error: Resource 24 is already using the URL samenamechild.html. Please enter a unique alias or use Freeze URL to manually override it.

I’m not sure if Freeze URL is the wat to go as I have other sites and this is the first time I get this issue.

Page 1: www.domainname.com/parent-1/samenamechild.html
Page 2: www.domainname.com/parent-2/samenamechild.html

1 Like

Hi!
Are you using apache? If so have you renamed the htaccess file? Or if nginx have you added the location rule?

Are both the parent and child are active and visible in the menu?

I’m using an Apache server and the htaccess file is renamed to .htaccess.

Yes…both are active and visible in the menu

I had a look at the code and noticed my <base href="[[++site_url]]" />

Should it be? <base href="[[!++site_url]]" />

Does the ! make a difference? I tried both but nothing

Do you have more parent>child in your menu? Are the acting the same way? If not, try to make one to test it’s behavior. Not sure what the problem is, but its a good start.

I do…it’s the same with the whole site.

Hmm.

Last thing I can think is that you modified the .htaccess or that the parent has no or an invalid alias.

I have this in my .htaccess file which seems correct

RewriteEngine On
RewriteBase /

# # The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

I found the solution. There is a new tick box that needs to be clicked in parent containers. It’s called ‘Use current alias in alias path’. It wasn’t on the older Modx Revo downloads. It’s in the Settings section of the Parent page.

This needs to be ticked if you want to see it in the URL

1 Like

Wow. Cool, glad you sorted!

Hang on, that should be ticked by default when you create a new resource I believe. Is that not happening?

1 Like

This post was flagged by the community and is temporarily hidden.

Can you help me ?

URL ; xxxxxxxxx.com/index.php?id=1 - index.php?id=2 etc etc…

How i do xxxxxxxx.com/about-us ?
How i use [[*alias] ?

Thanks.

1 Like

alias is created in the resource, you have to use aliases and just make the alian about-us