Magento : Allow URL as parameter - magento

I am integrating Bazaarvoice in Magento for Ratings and Reviews.
My issue is Bazaarvoice is redirecting to My site with some additional parameter in URL and it turns in to 404 error. I have contacted Bazaaevoice and they told me that Magento may not allow url as a parameter.
www.mysite.com/bazaarvoice?pid=4801-05E&bvdisplaycode=7529-en_us&bvappcode=rr&bvproductid=4801-05E&bvpage=http://abcd.ugc.bazaarvoice.com%2Fbvstaging%2F7529-en_us%2F4801-05E%2Fsubmitreview.htm%3Fformat%3Dembedded%26campaignid%3DBV_RATING_SUMMARY_ZERO_REVIEWS%26sessionparams%3D__BVSESSIONPARAMS__%26&bvcontenttype=REVIEW_SUBMISSION&bvauthenticateuser=false
IS there any solution that i can make the Magento to allow URL as a parameter.
Thanks

I dont think the issue is the parameter because this work
http://demo.magentocommerce.com/?pid=4801-05E&bvdisplaycode=7529-en_us&bvappcode=rr&bvproductid=4801-05E&bvpage=http://abcd.ugc.bazaarvoice.com%2Fbvstaging%2F7529-en_us%2F4801-05E%2Fsubmitreview.htm%3Fformat%3Dembedded%26campaignid%3DBV_RATING_SUMMARY_ZERO_REVIEWS%26sessionparams%3D__BVSESSIONPARAMS__%26&bvcontenttype=REVIEW_SUBMISSION&bvauthenticateuser=false
I think the issue maybe because you dont have this controller in your magento site
bazaarvoice
Does this url work or do you get a 404?
www.mysite.com/bazaarvoice

Related

Magento admin panel not accessible - secured site issue

for magento when i go to www.mydomain.com/admin, it will redirect to https://www.mydomain.com/home/index.php/admin/. error 404. I think this is unsecured url issue. how to solve this?
just try with below solution to change value in core_config_data data
find this web/secure/base_url and change with simple http or https
or if you have multiple store or view you can change according to that.
Also please don't forget to clear your cache.
hope this will sure help you.

Wrong url in magento paging

I have a problem regarding paging of the custom module. When i click on the next page the it take the url as localhost/magento/fme-support/index/index/url/BC/?p=1, but this url doesn't work properly, the correct URL is localhost/magento/fme-support/category/BC/?p=1.
Please suggest me how and i change this url.
Thanks.
Try making url rewrites off
If it doesn't work there is some issue with your extension you have installed
Check for redirect in your extension
The "index" in the URL means you are calling the index controller of the module.
Magento module URLs work like this
http://magento_installation.com/(storeview)/moduleMame/controllerName/functionName/

Magento - routing to paypal IPN script

I have a multi language site and am having Magento (1.7.0.2) "Add Store Code to Urls" (config/system/web).
I have overridden the app/code/core/Mage/Paypal with my own app/code/local/Mage/Paypal as I have added extra backend functionality.
I can hit the IPN scripts manually (as expected) through the URL by going to:
mysite.com/uk/paypal/ipn/ in the browser (which shows as a GET request in my apache access log, with a 200 status). However when paypal posts to the same URL (which shows as a POST request in the log) it results in a 404.
I don't understand why there is a difference in GET and POST to this URL but maybe it is something to do with Magento's routing?
Anyway, what can I do so that the IPN script can be hit by paypal, and I can still use store codes in the URLs?
After logging each class method I found that Magneto was trying to load a website with $scopeCode = 'us' in run() method in /var/www/simplesteps/site/src/app/code/core/Mage/Core/Model/App.php.
This is a throw-back to the time when we have a USA website, but this website had been removed, yet a reference to it was being used.
I am not sure where this reference was being set, after looking through CMS settings I could not find it. If anyone could tell me I'd appreciate that.
I fixed the issue by reinstating the USA website, which, it turns out should not have been removed.
The reason the IPN script was being correctly hit through the browser URL (GET 200) but not paypal (POST 404) is probably to do with it being called within the scope of the active website via the URL, and not a default or legacy reference to US site.
Hope this helps someone who may find a similar frustrating situation.

Magento and urlencoded urls

I have some links in google like this:
/%3Fcat%3D9%26dir%3Dasc%26limit%3D10%26mode%3Dlist%26order%3Dprice
which equals this link (urldecoded):
/?cat=5&dir=desc&order=price&p=2
If we go by url http://my-shop.com/%3Fcat%3D9%26dir%3Dasc%26limit%3D10%26mode%3Dlist%26order%3Dprice, then Magento shows us 404 error
How can i get Magento redirect those bad urls to their respective urldecoded correct urls?
Magento version 1.7.0.2
Thanks for your time
The problem is the url, not the redirect. I hope this is clear? You have to remove this urls from your shop and from google.
After that, I don't think, there is a good way to do this, because you try to fix an uncommon error.
The magento way might be adding rules to the htaccess or adding the rule to the Magento internal rewrite table, but both solutions don't handle generic rules or regex, which solves this (with the htaccess I'm not sure).
So, I would fix the "bad url creation" problem and hack the index.php at the beginning, check wether such an url is requested, decode it and redirect to the page, die();

Magento Homepage Keeps on redirecting to a 404 page

I have been on this issue for almost a week now and have been research all over the net for answers but i could not find one.
Problem:
each time i access the homepage of my site, it results to a 404 error.
ex.
http://www.domain.com ---> redirects to 404
http://www.domain.com/home ---> enters to the cms page that i set as my homepage
I have already run the magento cleanup scripts but it was not able to solve the problem.
ERROR MESSAGE:
Whoops, our bad...
The page you requested was not found, and we have a fine guess why.
If you typed the URL directly, please make sure the spelling is correct.
If you clicked on a link to get here, the link is outdated.
What can you do?
Have no fear, help is near! There are many ways you can get back on track with Magento Store.
Go back to the previous page.
Use the search bar at the top of the page to search for your products.
Follow these links to get you back on track!
Store Home | My Account
I've got a similar error and would like to post my solution here. The case was exactly the same for me: all the pages, categories, etc. worked perfectly, but the home page showed a 404 error.
I looked into the core_url_rewrite table and discover that there was an entry with the «request_path» field empty. So this entry was rewriting my base url and that was the reason for the 404 in my case. I just deleted it.
Hope this helps to other people.
If you are using the Enterprise version you should check the table enterprise_url_rewrite. The query below should help you:
select * from enterprise_url_rewrite where request_path="";
delete from enterprise_url_rewrite where request_path="";
Check the folowing:
1- System->Configuration->general->Web->secure
Base URL: http://www.your-site.com/
(be sure you are in the right shop site from the top left of the system)
2- System->Configuration->general->Web->Default Pages
Default Web URL: cms (yes just cms)
CMS Home Page: select your cms page
Default No-route URL: cms/index/noRoute
3- check your server has rewrites otherwise
System->Configuration->general->Web->Search Engines Optimization
Use Web Server Rewrites: No
4- something wrong with your .htaccess replace the file with the one in your original installer.
Because StackOveflow has this stupid rule that I must have a certain number of "points" before I can chime in on discussions I need to make this as a "new answer":
open-ecommerce.org's #2 also solved the problem for me
2- System->Configuration->general->Web->Default Pages Default Web URL:
cms (yes just cms) CMS Home Page: select your cms page Default
No-route URL: cms/index/noRoute
for me this was set to "index". No clue how it worked before, or why it was set that way, but after updating it broke and this was the fix for me.
Note that I did also truncate the 'core_url_rewrite' table as well in troubleshooting. If you don't change urls at all, or often, then that's no big deal. But if you are chaning URLs often, then you'll loose your 301 redirect history (all old urls will 404 going forward).
Open-ecommerce.org solution # 2 , worked for me.
I initially set my "Defaul Web URL" as the URL of the homepage. Similar to what I did with the baseURL but I was wrong.
I changed it to "CMS"
From there, it all works.
Thanks!

Resources