joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.76k stars 3.64k forks source link

[4.4] "Alias" for components, modules and templates. #41996

Closed Stuartemk closed 1 year ago

Stuartemk commented 1 year ago

Is your feature request related to a problem? Please describe.

I would like to natively be able to use an "Alias" for components, modules and templates, although for components I think it is essential for security, practicality and comfort. It would be wonderful to have it in 4.4 or at least version 5.

Describe the solution you'd like

Additional context

Possibly also a great help for custom SEO

dgrammatiko commented 1 year ago

I guess I might answer this one.

although for components I think it is essential for security

Concerning security Joomla 5 allows a public folder with almost the entirety of the site logic being hidden from the served directory. Check https://github.com/joomla/joomla-cms/pull/41446 or demo

be able to use an "Alias" for components, modules and templates

This has 2 folds, the static assets and the PHP. For the static assets it would be very wasteful to do any aliasing as Joomla would have to copy a lot of files to multiple directories with practically no benefit (security through obscurity). For the PHP part you have to realise that the only part that actually exposes its name (only in non SEF mode) is the component in the URL (something like index.php?option=com_content) so modules and templates WON'T benefit from such a strategy!

Possibly also a great help for custom SEO

Assuming that achieving better SEO is through SEF URLs then the alias makes zero sense (as the option=com_content is completely hidden in the URL (a SEF URL looks like something/category/some-title.

In sort, Joomla 5 comes with better security options (public folder) and aliasing most parts of the system would add more overhead and almost no real benefit.

Stuartemk commented 1 year ago

I guess I might answer this one.

although for components I think it is essential for security

Concerning security Joomla 5 allows a public folder with almost the entirety of the site logic being hidden from the served directory. Check #41446 or demo

be able to use an "Alias" for components, modules and templates

This has 2 folds, the static assets and the PHP. For the static assets it would be very wasteful to do any aliasing as Joomla would have to copy a lot of files to multiple directories with practically no benefit (security through obscurity). For the PHP part you have to realise that the only part that actually exposes its name (only in non SEF mode) is the component in the URL (something like index.php?option=com_content) so modules and templates WON'T benefit from such a strategy!

Possibly also a great help for custom SEO

Assuming that achieving better SEO is through SEF URLs then the alias makes zero sense (as the option=com_content is completely hidden in the URL (a SEF URL looks like something/category/some-title.

In sort, Joomla 5 comes with better security options (public folder) and aliasing most parts of the system would add more overhead and almost no real benefit.

Thanks for answering.

Regarding com_component, how feasible would it be to create an alias comxxxxxx or better yet a simple alias of xxxxxx without com ?

Including third-party components since those who look for vulnerabilities the first thing they look at is the URL, for that reason I also thought about modules and templates.

brianteeman commented 1 year ago

This makes no sense at all. Aside from it not really making anything more secure changing the name of the component will have zero impact on the url

Stuartemk commented 1 year ago

This makes no sense at all. Aside from it not really making anything more secure changing the name of the component will have zero impact on the url

Okay. However it is still for custom SEO, that is, it frees you from URL strings, suppose for example you share a URL that includes /com_jdownloads/ (it is horrible and unattractive) it can be any other just an example, I wish that instead I could put the alias of /downloads/ or /box/ or whatever alias I want.

brianteeman commented 1 year ago

a URL should never contain the name of the component if it is using the joomla router and you have setup the component correctly.

brianteeman commented 1 year ago

@quy what information is required? This should just be closed

Quy commented 1 year ago

Just waiting for a final response from the OP before closing, but yours will do. Thanks.