Redirect Home Page In Cs-Cart

HI there,

We are using a Wordpress setup along with Cs-Cart, Our main site(Wordpress one) is installed on the root domain at sitename.com while the Cs-Cart is installed in a subfolder → sitename.com/store. However we don't want to display the home page for cs-cart and are only interested in the categories and product page. Thus we want to redirect the home page of Cs-Cart to one of our wordpress pages. i.e. sitename.com/store would redirect to sitename.com/page. But the rest of the pages, i.e. the category and product one would work in the same way as usual.

How can we carry out this change? i.e. to redirect home page of cs-cart

Best,

NaMo

Try to create the app\addons\my_changes\controllers\frontend\init.post.php file with the following content:


```php

use Tygh\Registry;
if (!defined('BOOTSTRAP')) { die('Access denied'); }
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
return;
}
if (Registry::get('runtime.controller') == 'index' && Registry::get('runtime.mode') == 'index') {
fn_redirect('http://google.com', true, true);
}
```

Dear Sir/Madam,

I could not find the [b]app\addons\my_changes\controllers\frontend\init.post.php [/b], under the app/addons/my_changes, only two files addon.xml and addon.xml.full existed but no other files.

Is there anything that I missed in the installation?

Best regards,

Kelvin.

Try to create the [b]app\addons\my_changes\controllers\frontend\init.post.php [/b]file with the following content:


Dear Sir/Madam,

I could not find the [b]app\addons\my_changes\controllers\frontend\init.post.php [/b], under the app/addons/my_changes, only two files addon.xml and addon.xml.full existed but no other files.

Is there anything that I missed in the installation?

No, this file is not a part of the clean installation. You should create it manually

Thanks! I tried but not work. I tried to access sitename.com/store but it redirect to google.com but not the store itself.

I think this question is same as my question at http://forum.cs-cart.com/topic/42306-create-the-landing-page-of-my-cs-cart/

Thanks! I tried but not work. I tried to access sitename.com/store but it redirect to google.com but not the store itself.

I think this question is same as my question at http://forum.cs-cart.com/topic/42306-create-the-landing-page-of-my-cs-cart/

Thank you for the clarification. In this case additional code modifications are required.

Dear Sir/Madam,

I read this post and the issuer request to redirect its sitename.com/store to sitename.com/page, I need to redirect sitename.com/ to sitename.com/page, is it possible to do with below code by little modification?

Create the app\addons\my_changes\controllers\frontend\init.post.php file with the following content: