Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 error #9

Open
RDXSportsCom opened this issue Jun 15, 2015 · 7 comments
Open

404 error #9

RDXSportsCom opened this issue Jun 15, 2015 · 7 comments

Comments

@RDXSportsCom
Copy link

i have 7 languages with code, and its showing me 404 on defaullt with default url

@rossmc
Copy link

rossmc commented Jul 20, 2015

@RDXSportsCom & @jreinke,

I'm having a similar issue, getting a 404 when I go to the default store view and the normal url behaviour when I select a different storeview.

Nothing in my exception.log either

@SunshineTech
Copy link

Modifying the Line 26 in Bubble_HideDefaultStoreCode_Model_Observer can solve it.

old code:
$requestUri = $request->getServer('SCRIPT_NAME') . '/' . $storeCode . '/' . $requestUri;

new code:
$requestUri = '/' . $storeCode . '/' . $requestUri;

@16hands
Copy link

16hands commented Oct 21, 2015

@SunshineTech's fix worked for a site we've been working on also, its a great module for retro fitting multi-store into an existing magento setup

Thanks for the fix

@altafhussain10
Copy link

Not working for me in Magento 1.9.2. Still get 404 page :( and also a too many redirects error

@liuggio
Copy link

liuggio commented Nov 17, 2015

@SunshineTech great catch!

@liuggio
Copy link

liuggio commented Nov 17, 2015

@jreinke please accept PR

@liuggio
Copy link

liuggio commented Dec 14, 2015

We have fixed in this way

<?php

    public function onFrontInitBefore(Varien_Event_Observer $observer)
     // ... 

            $hasGotScriptName = strpos($requestUri, $request->getServer('SCRIPT_NAME'));

      // ...
                    $prefixScriptName = "";
                    if ($hasGotScriptName !== false) {
                      $prefixScriptName =  '/' .trim($request->getServer('SCRIPT_NAME'), '/');
                    }

                    $requestUri = $prefixScriptName.'/' . $storeCode . '/' . $requestUri;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants