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
Related
Currently i'm working on a backend website admin but i have some trouble with redirecting. The issue is this when someone wants to edit a specific job function he needs to be redirected to for example: jobs/edit/Webdeveloper and in the PHP script it will send in an action to go to the edit page but when i redirecting it, it stays on the same page and does a simply refresh.
This is what i have as an link tag:
<a href='".$adminurl."/jobs/edit/".$list["function"]."'>Change</a>
And it works out like this domain.com/admin/jobs/edit/Webdeveloper
This is what i have in my .htaccess
RewriteRule ^jobs/change/(.*) jobs.php?&action=change&job=$1
What am i doing wrong here?
We run Magento 2.1.7 and have the following problem:
When an URL is entered that does not exist magento starts an autosearch with the path. We want to redirect to a 404 error page if a wrong url is entered.
example:
correct url = www.domain.com/category1/product1
when you enter the url with a spelling mistake (www.domain.com/category1/ppproduct1) magento redirects to search page and starts searching after "category1 ppproduct1"
any ideas how to prevent this?
Go to admin panel and find the following option.
store->configuaration->web->Find the "Default Pages" option
CMS No Route Page : 404 Not Found
Change this setting and check. Clear cache.
I moved a Prestashop (1.6) to a new domain. I see the shop at the new domain and can login in the admin panel, but al the product, categorie and other links of sub pages are not working. For all I see the message that I'm on a old link, but "'m still at the new domain.
I have changed the domain in the admin under Prefences -> SEO and URL's.
Any idea?
Like #Florian Lemaitre said try to do next:
On Prefences -> SEO and URL's switch Off and then On "Friendly URL", it will regenerate your .htaccess file.
On Performance tab clear Smarty cache.
Can you check your .htaccess file at the root of your website to see if it has been updated with the new domain ?
If not go back to SEO and URL's and save your configuration again. If the .htaccess is still not updated Prestashop might not have the required rights to edit it.
I have the following issue, I'm building a website and it's deployed inside a subdirectory of my server, the website is a referral for sales services. Then on the homepage I have two links that references the two main categories of the products sold in it. Now the first link href's is /es/sports/ if I click on it I get a 404 error but if I copy paste the url in the browser then the page is shown correctly.
Note, when I click the link it is redirected to /sports/ instead of /es/sports/ as corresponds.
Maybe some htaccess configuration on the root of the public folder?
It's a laravel powered website.
The website url is the following. http://entrenamiento.com/es/ the links are the ones on the left sidebar.
First of all thanks for all comments and help. The thing is as follows, the parent website on the htaccess file has no support for trailing slashes after the URL. So once the trailing slash rule is enabled then the website works as expected. Thanks again
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?