where we define checkout page has to be https - magento

If we enable https in our site at admin apnel then home page and checkout pages will run under https and other page will run under http only. So in which page we make this settings? I know by default magento provides this, But I need to know in which file this configuration will de defined?

The configuration for certain pages to be secure is done in the config.xml file of each module. Let's take as example the checkout page. In app/code/core/Mage/Checkout/etc/config.xml there is this:
<frontend>
<secure_url>
<checkout_onepage>/checkout/onepage</checkout_onepage>
<checkout_multishipping>/checkout/multishipping</checkout_multishipping>
</secure_url>
....
</frontend>
This tells Magento that the pages /checkout/onepage and /checkout/multishipping should be secure if HTTPS is enabled.
The decision if an url is secure or not is made by this line:
$this->_checkShouldBeSecure($request, '/'.$module.'/'.$controller.'/'.$action);
in Mage_Core_Controller_Varien_Router_Standard::match() method

Related

Rewrite base url to show content of cms page

Trying to rewrite a base url e.g http://beta.mydomain.com to http://beta.mydomain.com/cms/index.cfm/new-home but want browser to show base url not the cms url.
Im trying this in isapi httpd config file:
RewriteRule ^$ /cms/index.cfm/new-home [NC,L]
but it simply redirects to http://beta.mydomain.com/cms/index.cfm/new-home
which is correct except that the browser must show http://beta.mydomain.com/ not the cms part.
We are using IIS 6 with isapi module installed. Thats the only thing I know about the server (but I have access to server). Is that possible? If not then what other options do I have?
I have an idea: Load http://beta.mydomain.com/cms/index.cfm/new-home in an iFrame.
For example if someone browser to base URL i.e. http://beta.mydomain.com/ then load http://beta.mydomain.com/cms/index.cfm/new-home page in iframe.
It should be like a condition at top of your index page.
if (only baseURL) {
iFrame: Load http://beta.mydomain.com/cms/index.cfm/new-home
}
Hope this help :)

URL Scheme Rewriting, from HTTP to HTTPS, for Specific domains, within a Browser

Is there a way to configure browser (Firefox/Chrome) such that, if it encounters an HTTP URL (clicked or entered on address bar - eg: http://abc.xyz.com/... ), it modifies it to an https URL https://abc.xyz.com/...
Note that the site abc.xyz.com accepts both http:// and https:// schemes for the same URL. This site does not do any redirection for http:// links to enforce https scheme, and I do not want to access this site via http:// scheme.
I understand that this can be done with help of a web-server proxy (eg: Apache's mod_rewrite), but I am looking for a browser-only solution (say, via browser's "about:config" variables or some browser plugin, or some other method).
Adding abc.xyz.com to the browser's HSTS preloaded list seems like the best way to do this, but that can only by initiated and setup by abc.xyz.com site's admin. "HTTPS Everywhere" browser plugin comes close, but I could not find how to add my own/preferred sites in it's UI.
Found a way to do it, with "HTTPS Everywhere" Firefox plugin.
However note that "HTTPS Everywhere" has its own rulesets for numerous/popular sites (maintained elsewhere). This is only needed for custom sites, not yet supported by "HTTPS Everywhere".
Create a ruleset in a file such as below in Firefox profile directory as below (Windows 10) and restart the browser.
<!--
THIS_FILE: FIREFOX_PROFILE_DIRECTORY\HTTPSEverywhereUserRules\my_torrents.xml
FIREFOX_PROFILE_DIRECTORY: %APPDATA%\Mozilla\Firefox\Profiles\...
NOTE: To avoid un-necessary entries, check if custom hosts/sites are already supported in https://www.eff.org/https-everywhere/atlas/ , before adding it here
-->
<ruleset name="MY_HTTPS_RULESET">
<!-- for my Wiki server, always use HTTPS -->
<target host="192.168.1.210" />
<!-- for a site not yet supported by HTTPS Everywhere, but want this in HTTPS -->
<target host="torrasave.download" />
<!-- add more such custom entries -->
<!-- add more such custom entries -->
<rule from="^http:" to="https:" />
</ruleset>

onepage checkout page is not loading

I had updated a custom theme in magento 1.9 all goes well but when I click on "proceed to checkout" button on cart page (i.e http://mysite/checkout/cart/) it shows link(http://mysite/checkout/onepage/) but always redirects to home page
and If I change the theme to (rwd theme) then this page "link(http://mysite/checkout/onepage/)" runs well
what I am missing in my custom theme that unables the onepage checkout page to load correctly? PLEASE HELP
I checked admin settings >System>Configuration>General>Web
secure base url and other settings all are ok but still I am not able to load to checkout. It still redirects to homepage.
I refer to this link http://www.neiltolbert.com/magento-ssl-checkout-redirect-fix/ for admin settings
If checkout page url is not correct then correct the url for redirection.
Check .htaccess file taht is rewrite mod is ON.
<IfModule mod_rewrite.c>
// rewrite code here
</IfModule mod_rewrite.c>
And check url rewrite code of checkout page if custom rewrite code is available.
And Need to check your add to cart button action , Action url must be redirected to checkout page.

Change Magento header Checkout URL

In the header of Magento the checkout url goes to /checkout/onepage/. How can I change this to /onepagecheckout/?
Please use url rewrite in this case.
you can refer this link

Admin Controller Rewrite Issue

I have problem in rewriting the admin Customer controller class. It is working fine in my local system but in my server it is not. The following is the code used to rewrite the admin customer controller class:
<rewrite>
<Ritwik_Wishlistenhanced_Customer_exportCsvwishlist>
<from><![CDATA[#^/admin/customer/exportCsvwishlist#]]></from>
<to>/wishlistenhanced/customer/exportCsvwishlist</to>
</Ritwik_Wishlistenhanced_Customer_exportCsvwishlist>
</rewrite>
Usually it's because production server is running Linux/UNIX which has case-sensitive file system and that influences controllers lookup. So you probably need to change exportCsvwishlist to exportcsvwishlist in your rewrite and case of yourcontroller.php file

Resources