6
votes
Accepted
Create a link from Backend to SEF Path in Frontend
Since 3.9 there's Joomla\CMS\Router\Route::link() method which takes client (site or administrator) as first argument.
$link = 'index.php?option=com_content&view=article&id=1';
echo '<a ...
5
votes
Accepted
How do i remove the id from Joomla 3 URLs using code
Good question.
It looks likely that the new Joomla router held over until Joomla 3.6 will fix this issue.
In the meantime, there is a $15 extension, SEF Wizard for Joomla that, "removes IDs from the ...
4
votes
How to configurate Joomla or Apache for v1 SEF Urls?
I managed to piece together a solution without using .htaccess, though I'm interested in a cleaner solution if somebody has one.
I created a system plugin that really does nothing in the conventional ...
3
votes
Accepted
Supporting SEF URLs in custom component
In the old days, the router.php file contained functions: BuildRoute and ParseRoute. Nowadays, if you look at the router.php of the banners extension for example, you will see a class called ...
2
votes
SH404SEF : How to redirect a URL to home?
sh404SEF developer here
The answer by FFrewin above is not correct. To redirect some URLs to home page, you simply:
Click on the "Home page meta" toolbar button on any page of sh404SEF control panel
...
2
votes
Accepted
SH404SEF : How to redirect a URL to home?
It's a bit tricky to do this redirection in SH404SEF.
Here is the practical steps to achieve that:
In SH404SEF URL Manager, find the SEF urls of the page that you want to redirect to homepage.
...
2
votes
Accepted
How to remove IDs from SEF URL in Joomla?
I found the solution with the help of @Farahmand, here it is:
<?php
defined('_JEXEC') or die;
function empresaBuildRoute(&$query) //Esta función divide la url y se trae las variables.
{
$...
2
votes
How to modify a SEF URL including an arbitrary text
Check Language Filter system plugin, you'll see how they manipulate the url to add language prefix to links. You could use the same method to add location prefix based on cookie value.
Here is what I ...
2
votes
Why Joomla 3 add Canonical tag to current page and made it unindexable?
The solution that worked for me is the same as Robert Went has on his blog.
Here it his:
$doc = JFactory::getDocument();
foreach($doc->_links as $k => $array){
if($array['relation'] == '...
2
votes
How to change URL's for each page in joomla 3.4?
Joomla SEF URLs - the background
I will try to give briefly some background info.
The common way for displaying content/pages in Joomla, is to create it inside Components..
Components provide menu ...
2
votes
Accepted
One link to point a multilanguage article
Joomla router just doesn't work that way.
Only way you could have a link /article-for-all is to create a menu for each article and to manualy set that alias in both menu items, because Search ...
2
votes
Accepted
Redirecting to component when using SEF
The correct way to do that and to accomplish more complicated tasks is to add a router file in /components/com_rouf/router.php with a class that will manage your custom routing.
Take a look at the ...
2
votes
Accepted
How can I make all pages urls of my joomla 3 web site have the .html extension?
Here is how to show it:
For adding the document extension type in your URLs, you need to go in:
-> Global Configuration
-> Site
-> enable the "Add Suffix to URL" setting, at the SEO Settings ...
2
votes
Accepted
Absolute SEF url with JRoute
You could try this way:
$itemid = 164;
$application = JFactory::getApplication();
$menu = $application->getMenu();
$item = $menu->getItem( $itemid );
$link = new JURI( $item->link );
$link-&...
2
votes
Using SEF URLs breaks all templates
I found the problem:
The templates were not at all responsible.
I am using the JCH Optimize plugin. In the Basic Options tab, there is a Use url rewrite parameter. That was the problem. When I ...
2
votes
How does Joomla! URL Re-writing works?
The following are sequence of steps occur when you invoke a url:
Joomla will split the url into parts separated by "/", each part (apart form website name itself) is alias of a menu item, an article ...
2
votes
Is it safe to use `Use URL Rewriting` option?
When SEF is enabled on a Joomla website, the old non-sef urls still work normally so search engines will still be able to find the pages whether they use the SEF or non-SEF url.
These days, Google ...
2
votes
Article appears even outside given path
This is a problem with the Joomla content router. Specifically, in the following code:
if (!$advanced)
{
$cat_id = (int) $segments[0];
$article_id = (int) $segments[$count - 1];
if ($...
2
votes
Accepted
Joomla 2.5.6 infinite 303 loop (SEF)
The problem is likely your HTTPS redirect. You are likely redirecting to HTTPS at the beginning of your .htaccess file, and later redirecting to HTTP. Another scenario is when your Joomla website is ...
2
votes
Accepted
Menu links working only for logged in users
It's probably best to run a backup before making any changes.
SEF
To narrow down the problem, try disabling URL Rewriting and SEF and renaming .htaccess to .htaccess.old. If this helps, try re-...
2
votes
Accepted
How to disable Joomla routing by Article ID with any alias but use exact alias only
May not be practical for blog articles, but a fixed url can be achieved via menu items: https://docs.joomla.org/Search_Engine_Friendly_URLs#Limitations
Otherwise, if I see it correctly, you have to ...
2
votes
Update SEF URL to change what is output
Joomla works with internal (for example /index.php?option=com_content&view=article&id=42) and external SEF URLs (/some-name). The SEF URLs are created via the menu, and the "alias" ...
2
votes
J4 component URL not SEF
Solution found, all details on https://forum.joomla.org/viewtopic.php?f=831&t=996848
To create a routing in J4 with same behavior that J3, you need to create 4x files :
/com_componentname/src/...
1
vote
How to change SEF urls to remove item view from url?
Take a look into the com_content router, category blog view works like that,
shows a list of articles under domain.com/blog and the links are generated like
domain.com/category/1-my-first-article
But ...
1
vote
How do i remove the id from Joomla 3 URLs using code
I use Direct Alias Pro. It's $24, works like a charm and is lightweight without all the other random features.
https://alterbrains.com/joomla-extensions/seo/direct-alias-pro
1
vote
Canonical issues- incorrect URL shown on home page
Add this to your templates index.php file before the closing body tag:
$JInput = JFactory::getApplication()->input;
$itemid = $JInput->get('Itemid','','int');
if($itemid == 'YOUR NUMERIC HOME ...
1
vote
SEF urls without article ID causes 404 article not found error
I would say (even though you're saying that you already checked that), that the problem is caused by duplicate aliases. I recommend you check that the alias does not exist twice in the #__content ...
1
vote
SEF urls without article ID causes 404 article not found error
Yes it's possible to get urls without IDs by rewriting the router.php, but I don't recommend to change core files or core components like the com_content for future compatibility.
You should use a ...
1
vote
SEF urls without article ID causes 404 article not found error
Well, I believe you've faced my issue.
You can take a look here - you'll find why it's happening and how to quick fix it.
https://github.com/joomla/joomla-cms/pull/10261
1
vote
.htaccess and localhost issue
An .htaccess file from a live environment may contain many directives that cannot work in another environment, especially a localhost environment.
In your case, I would guess to look for the
# ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
sef × 121joomla-3.x × 50
url × 39
.htaccess-configuration × 15
seo × 14
jroute × 13
redirect × 10
non-sef-url × 10
k2 × 8
joomla-4.x × 8
router × 8
component × 7
php × 6
custom-component × 6
joomla-3.4 × 5
alias × 5
sh404sef × 5
joomla-2.5 × 4
templates × 4
tags × 4
development × 3
articles × 3
joomla-3.3.x × 3
menu-item × 3
virtuemart × 3