Hello,
I’m wondering if there is a way to have a different type of friendly urls in modx.
For example my current url structure is:
www.name.com/parent1/subparent2/subparent3/pagetitle
i would love to have it a bit shorter (without changing the actual folder structure), so when somebody types:
www.name.com/parent1/pagetitle or even: www.name.com/pagetitle
they get to a needed page...
Thanks,
Aleks
MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5
-
MODX Staff
- 730 Posts
If you set "Use friendly alias path" to "No" (in Tools > Configuration > Friendly URLs) then your site will operate with all URLs appearing in the "root" of the site, regardless of the folder structure of your site. However, I recommend you set "Allow duplicate aliases" to "No" and make sure that you do not have any duplicate aliases.
If you want both (some parts of your site to have a folder structure to the URLs and another part of your site to have shorter root-level URLs) that will be much more complicated.
thank you!
there will definitely be a situation where some pages are named the same (for example for yearly document archives in different folders).
Would you be able to outline the generic steps in order to make it work for both cases:
www.name.com/pagetitle
and
www.name.com/parent1/pagetitle
Can i setup somekind of a TV to indicate if this should be a full alias path or a single name page ?
This is a great help for SEO placements... for example google will rank higher page: www.name.com/sneakers/nike than www.name.com/sneakers/collections/winter07/performance/nike
Thank you!
Aleks
MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5
-
MODX Staff
- 730 Posts
Quote from: bakalek at Jan 15, 2008, 02:08 PM
Would you be able to outline the generic steps in order to make it work for both cases:
Manually putting rewrite rules as banal suggests is the closest thing to "generic steps" that I can think of.
I have a hazy vision of being able to accomplish this with a plugin, but there are a lot of things to consider. It would be a bit of a project, but since yours is the second request I’ve read for such a thing, I will start to sketch it out and see if it leads me to a real, possible solution, or to a dead end.
Thanks guys!
After some more thinking i came up with the idea to use ’web links’ for shorter urls.
It works great when you need to have only 10-50 pages with shorter urls but almost impossible to manage the site with hundreds of pages.
So, what would be great is to have a checkbox next to the alias filed in the manager which would set the current document’s url to the ’short’ version (meaning - alias only) and automatically create the weblink in the background. Basically each document might have 2 sets of aliases without accessing .htaccess file for every story.
Am i dreaming?
Aleks
MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5