working on it ...

Filters

Explore Public Snippets

Sort by

Found 759 snippets matching: 301

    public by chilly_bang  2482  1  6  2

    PHP 301 redirect non-HTTPS requests to https://

    Redirects based on port and protocol
    <?php
    if (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] !== 'on') {
    if(!headers_sent()) {
    header("Status: 301 Moved Permanently");
    header(sprintf(
    'Location: https://%s%s',
    $_SERVER['HTTP_HOST'],
    $_SERVER['REQUEST_URI']
    ));
    exit();
    }
    }
    ?>
    
    <?php
    if(!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == ""){
    $redirect = "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    header("HTTP/1.1 301 Moved Permanently")
    header("Location: $redirect");
    }
    ?>
    
    <?php
    if ($_SERVER["SERVER_PORT"] != 443) {
    $redir = "Location: https://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
    header($redir);
    header("HTTP/1.1 301 Moved Permanently");
    exit();
    }
    ?>
    

    public by chilly_bang  1659  1  5  0

    301 Redirect /Homepage.aspx to the root

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{THE_REQUEST} ^.*/Homepage\.aspx 
    RewriteRule ^(.*)Homepage.aspx$ /$1 [R=301,L]
    </IfModule>

    public by Geometry  1024  1  5  0

    Allows to Register Bundles

    For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
    using System.Web;
    using System.Web.Optimization;
    
    // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
    public static void RegisterBundles(BundleCollection bundles)
    {
        bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                    "~/Scripts/jquery-{version}.js"));
    
        // Use the development version of Modernizr to develop with and learn from. Then, when you're
        // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
        bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                    "~/Scripts/modernizr-*"));
    
        bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                  "~/Scripts/bootstrap.js",
                  "~/Scripts/respond.js"));
    
        bundles.Add(new StyleBundle("~/Content/css").Include(
                  "~/Content/bootstrap.css",
                  "~/Content/site.css"));
    }

    public by msdn  130940  0  8  0

    RegisterBundles

    // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
    using System.Web;
    using System.Web.Optimization;
    
    // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
    public static void RegisterBundles(BundleCollection bundles)
    {
        bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                    "~/Scripts/jquery-{version}.js"));
    
        // Use the development version of Modernizr to develop with and learn from. Then, when you're
        // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
        bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                    "~/Scripts/modernizr-*"));
    
        bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                  "~/Scripts/bootstrap.js",
                  "~/Scripts/respond.js"));
    
        bundles.Add(new StyleBundle("~/Content/css").Include(
                  "~/Content/bootstrap.css",
                  "~/Content/site.css"));
    }

    public by msdn  3145  1  7  0

    RegisterBundles: Register Bundles For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862

    Register Bundles For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
    using System.Web;
    using System.Web.Optimization;
    
    /// <summary>
    /// Register Bundles
    /// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
    /// </summary>
    /// <param name="bundles"></param>
    public static void RegisterBundles(BundleCollection bundles)
    {
        bundles.Add(new ScriptBundle("~/bundles/app")
        .Include("~/Scripts/knockout-2.2.0.debug.js")
            .Include("~/Scripts/moment.min.js")
            .Include("~/Scripts/config.js")
            );
    
        bundles.Add(new ScriptBundle("~/bundles/home")
            .Include("~/Scripts/Pages/home.js")
            );
    
        bundles.Add(new ScriptBundle("~/bundles/detail")
           .Include("~/Scripts/Pages/detail.js")
           );
    
        bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                    "~/Scripts/jquery-{version}.js"));
    
        bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                    "~/Scripts/jquery-ui*"));
    
        bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                    "~/Scripts/jquery.validate*"));
    
        bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                    "~/Scripts/modernizr-*"));
    
        bundles.Add(new ScriptBundle("~/bundles/jquerymobile").Include("~/Scripts/jquery.mobile*"));
    
        bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));
    
        bundles.Add(new StyleBundle("~/Content/mobilecss").Include(
            "~/Content/jquery.mobile*",
            "~/Content/expenses-theme.min.css"
            ));
    
        bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
                    "~/Content/themes/base/jquery.ui.core.css",
                    "~/Content/themes/base/jquery.ui.resizable.css",
                    "~/Content/themes/base/jquery.ui.selectable.css",
                    "~/Content/themes/base/jquery.ui.accordion.css",
                    "~/Content/themes/base/jquery.ui.autocomplete.css",
                    "~/Content/themes/base/jquery.ui.button.css",
                    "~/Content/themes/base/jquery.ui.dialog.css",
                    "~/Content/themes/base/jquery.ui.slider.css",
                    "~/Content/themes/base/jquery.ui.tabs.css",
                    "~/Content/themes/base/jquery.ui.datepicker.css",
                    "~/Content/themes/base/jquery.ui.progressbar.css"
                    ));
    }

    public by msdn  1770  0  8  0

    RegisterBundles

    // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
    using System.Web;
    using System.Web.Optimization;
    
    // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
    public static void RegisterBundles(BundleCollection bundles)
    {
        bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                    "~/Scripts/jquery-{version}.js"));
    
        bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                    "~/Scripts/jquery.validate*"));
    
        // Use the development version of Modernizr to develop with and learn from. Then, when you're
        // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
        bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                    "~/Scripts/modernizr-*"));
    
        bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                  "~/Scripts/bootstrap.js",
                  "~/Scripts/respond.js"));
    
        bundles.Add(new StyleBundle("~/Content/css").Include(
                  "~/Content/bootstrap.css",
                  "~/Content/site.css"));
    
        // Set EnableOptimizations to false for debugging. For more information,
        // visit http://go.microsoft.com/fwlink/?LinkId=301862
        BundleTable.EnableOptimizations = true;
    }

    external by Github  139  0  2  0

    http://delifoodie.com/node/301420 http://delifoodie.com/node/301497 http://delifoodie.com/node/301468 http://delifoodie.com/node/301533 http://delifoodie.com/node/301539 http://delifoodie.com/node/301540 http://delifoodie.com/node/301545 http://delifoo...

    http://delifoodie.com/node/301420 http://delifoodie.com/node/301497 http://delifoodie.com/node/301468 http://delifoodie.com/node/301533 http://delifoodie.com/node/301539 http://delifoodie.com/node/301540 http://delifoodie.com/node/301545 http://delifoodie.com/node/301513 http://delifoodie.com/node/301582 http://geometria.tv/users/4422245/blog/18602
    http://delifoodie.com/node/301420 http://delifoodie.com/node/301497 http://delifoodie.com/node/301468 http://delifoodie.com/node/301533 http://delifoodie.com/node/301539 http://delifoodie.com/node/301540 http://delifoodie.com/node/301545 http://delifoodie.com/node/301513 http://delifoodie.com/node/301582 http://geometria.tv/users/4422245/blog/186020 http://delifoodie.com/node/301542 
    
    

    external by Github  81  0  1  0

    http://delifoodie.com/node/301941 http://delifoodie.com/node/301903 http://delifoodie.com/node/301731 http://delifoodie.com/node/301977 http://delifoodie.com/node/301936 http://delifoodie.com/node/301820 http://delifoodie.com/node/301937 http://delifoo...

    http://delifoodie.com/node/301941 http://delifoodie.com/node/301903 http://delifoodie.com/node/301731 http://delifoodie.com/node/301977 http://delifoodie.com/node/301936 http://delifoodie.com/node/301820 http://delifoodie.com/node/301937 http://delifoodie.com/node/302014 http://delifoodie.com/node/302028 http://delifoodie.com/node/301816 http://del
    http://delifoodie.com/node/301941 http://delifoodie.com/node/301903 http://delifoodie.com/node/301731 http://delifoodie.com/node/301977 http://delifoodie.com/node/301936 http://delifoodie.com/node/301820 http://delifoodie.com/node/301937 http://delifoodie.com/node/302014 http://delifoodie.com/node/302028 http://delifoodie.com/node/301816 http://delifoodie.com/node/301986 
    
    

    external by Github  128  0  2  0

    http://delifoodie.com/node/301252 http://delifoodie.com/node/301255 http://delifoodie.com/node/301195 http://delifoodie.com/node/301270 http://delifoodie.com/node/301339 http://delifoodie.com/node/301342 http://geometria.tv/users/4421940/blog/186017 h...

    http://delifoodie.com/node/301252 http://delifoodie.com/node/301255 http://delifoodie.com/node/301195 http://delifoodie.com/node/301270 http://delifoodie.com/node/301339 http://delifoodie.com/node/301342 http://geometria.tv/users/4421940/blog/186017 http://delifoodie.com/node/301457 http://delifoodie.com/node/301461 http://delifoodie.com/node/3013
    http://delifoodie.com/node/301252 http://delifoodie.com/node/301255 http://delifoodie.com/node/301195 http://delifoodie.com/node/301270 http://delifoodie.com/node/301339 http://delifoodie.com/node/301342  http://geometria.tv/users/4421940/blog/186017 http://delifoodie.com/node/301457 http://delifoodie.com/node/301461 http://delifoodie.com/node/301350 
    
    

    external by Github  117  0  2  0

    http://delifoodie.com/node/301015 http://delifoodie.com/node/301107 http://delifoodie.com/node/301112 http://delifoodie.com/node/300972 http://delifoodie.com/node/301222 http://delifoodie.com/node/301212 http://delifoodie.com/node/301224 http://delifoo...

    http://delifoodie.com/node/301015 http://delifoodie.com/node/301107 http://delifoodie.com/node/301112 http://delifoodie.com/node/300972 http://delifoodie.com/node/301222 http://delifoodie.com/node/301212 http://delifoodie.com/node/301224 http://delifoodie.com/node/301199 http://delifoodie.com/node/301281 http://delifoodie.com/node/301287 http://del
    http://delifoodie.com/node/301015 http://delifoodie.com/node/301107 http://delifoodie.com/node/301112 http://delifoodie.com/node/300972 http://delifoodie.com/node/301222 http://delifoodie.com/node/301212 http://delifoodie.com/node/301224 http://delifoodie.com/node/301199 http://delifoodie.com/node/301281 http://delifoodie.com/node/301287 http://delifoodie.com/node/301197 
    
    
    • Public Snippets
    • Channels Snippets