I made an application in Joomla 3. Had a custom component in front end, which showing the details of a selected category.
Which the URL with out enable search engine friendly and URL rewrite as follows
wwww.sitename.com/index.php?option=com_arts&view=category&id=12
So I enabled the URL rewrite, SEO URL and URL suffix
http://www.sitename.com/component/arts/12.html?view=category
But I am trying to get a URL like this
http://www.sitename.com/caterory/12
I generated the link to this page using
<?php echo JRoute::_('index.php?Itemid=115&id='.$cat->id); ?>
Can anyone please help
Thanks in advance
To make the SEF router do what you want it to do, you have write your own router. You cannot, however, get rid of the component part of the URL.
Do do that, you do not need your own router, but a menu entry for each category. That menu does not have to be displayed, if you don't want to show it. The alias of that menu entry is then used for the SEF URL.
I think, this is what you are looking for
Supporting SEF URLs in your custom component
sef urls for custom component, which variant is better?
Related
Can anyone please help me with is question here. I want to set a CMS page as homepage in prestashop 1.7 and still able to keep the old default Prestashop homepage as my Shop button link in menu still?
Best way is to make a redirection, because on the Prestashop backend you cannot do that easely and it could harm your website. You can also build your own Html and integrate it on the homepage via a module.
But best seems to be with a redirection :
Your server uses apache, just add this line to the .htaccess :
Redirect 301 /retiredpage.html /newpage.html
Your server uses nginx, add this line to your configuration : rewrite ^/retiredpage.html$ /newpage.html permanent;
You don't know and you don't want that ? Just use a redirection module, there are many on Prestashop Addons.
On the index.php page at the root of the site, replace the code with that:
require(dirname(__FILE__).'/config/config.inc.php');
if(Tools::getValue('home')) {
Dispatcher::getInstance()->dispatch();
} else {
$link = new Link();
Tools::redirect($link->getCMSLink(ID_PAGE_CMS));
}
Then if you go on the homepage you will be redirected to the CMS page for which you have indicated the link, to go via the menu on the real home page, add? Home at the end of the url of your website www.yourwebsite.tld? home
I am using a CMS based on aspx which haven't any option for 301 redirection. I need to change URL for the services page or few more pages
For example I want to change (http://www.theedmontoncontractors.com/services.html) to (http://www.theedmontoncontractors.com/door-windows-installation-services.html).
Please let me know a search engine friendly answer.
I don't want let people find any 404 error page while go through /services.html via search engine
I also want search engine should not read or index /services.html page for future.
I hope this is not a very stupid question. I have to rewrite the url's of an existing website. I have never done that before, so I'm a little bit confused. I have allready written some rules that make a page like faq.php be accessible also by entering only faq without the .php extension, but the page fap.php it's still accessible and in the footer when I move the mouse over the faq icon the link shown in the browser is faq.php. To make the browser display faq and not faq.php do I have to change the href link in the page manually or there is another way?
For example: in this website(stackoverflow) when you move the mouse over questions, tags, users or other links, the browser displays only /questions (or the others) without .php(or whatever they used to built the website). How can I achieve that?
What you see in the status bar is what your server sends to the browser.
To remove .php from faq.php you must either
send only faq (PHP) or
replace the contents of href attributes on the client side (JavaScript).
I have a menu in Flash without access to it's links. One of the items leads to this link: http://dev.infinityfitness.pl/rozklad, but the domain is not mine.
Is it possible to override this link using htaccess that if user clicks in this menu item the redirect leads him to something like this http://infinityfit.dnawrot.nazwa.pl/rozklad?
The .htaccess file would need to reside on the domain you don't have access to, unfortunately.
It's not possible to "intercept" client side links inside of a flash app if you don't have access to the source code.
The friendly URLs are stored in the database for all the pages where they are used, but how would I define a friendly URL for this page:
http://www.vintage-adventures.com/en/modules/faq/faqs.php
so that it serves as (and links TO it look like) this:
http://www.vintage-adventures.com/en/modules/faq/faqs
Unlike all the other PS core pages, I don't know where the link_rewrite value would STORED and ACCESSED by PS so that this page/link behaves just like all the other friendly URL pages/links. I realize that AFTER it is defined in the database, then I would make a rewrite rule entry in .htaccess so that browsers will fetch the actual content from the non-friendly address. I need to get it DEFINED first, though.
Usually its within the Tools > CMS section there is the meta tags and URL if I am not mistaken...
In prestashop 1.4 you can set this under
Preferences > SEO & URLs in admin.
Solved by creating a file in root called faq.php with the following code:
<?php
include(dirname(__FILE__).'/modules/faq/faqs.php');
Then SEO & URL tab should pick up faq.php in root which can be given a friendly URL.
Once assigned a friendly URL regenerate an ".htaccess"