Wed, May 25, 2022
https://devcodepro.comdevcodepro
Home · Latest · Trends
6

htaccess redirect http to https

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
rated 6 times (6) (0)
comments: 1 / hits: 2379  / 4 years ago, sat, jun 23, 18, 11:07:37
More From » Apache
 

Comments

3
This code work for me

Code:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com\folder
RewriteRule ^(.*)$ https://www.example.com\folder/$1 [R,L]
[#9] Friday, July 27, 2018, 2:34:15
 
Ronald
commented 4 years ago
Only authorized users can post. Please sign in first, or register a free account
Login with Google
 
Share
Posted
my3profile
Member since May 21, 2018
Total Code Snippets: 4
Total Comments: 1
Location: n/a
my3profile snippets
4 years ago, mon, may 21, 18, 4:27:10
<div itemscope itemtype="http://schema.org/Article"> <h4 class="black" itemprop="name">My Article Name</h4> <meta itemprop="headline" content="My Article Headline" /> <meta itemprop="image" content="http://www.example.com/myarticleimage.jpg" /> <time datetime="2018-05-21" itemprop="datePublished"></time> <div itemprop="description">My Description</div> <span itemtype="https://schema.org/Person" itemscope="itemscope" itemprop="author"> <span itemprop="name">Name</span> </span> <span itemtype="https://schema.org/Organization" itemscope="itemscope" itemprop="publisher"> <span itemprop="name">Website Articles</span> <span itemprop="logo" itemscope itemtype="https://schema.org/ImageObject"> <meta itemprop="url" content="http://www.example.com/images/logo.png" /> <meta itemprop="width" content="250" /> <meta itemprop="height" content="45" /> </span> </span> <span itemtype="https://schema.org/review" itemscope="itemscope" itemprop="review"> <span itemtype="https://schema.org/Rating" itemscope="itemscope" itemprop="reviewRating"> <span itemprop="ratingValue" content="4">4</span> out of 5 stars based on 1 votes </span> <span itemtype="https://schema.org/Person" itemscope="itemscope" itemprop="author"> <meta itemprop="name" content="Name" /> </span> </span> </div>
comments: 0 / hits: 1344
3 years ago, sun, jan 20, 19, 7:48:04
<?php if (isset($_POST['query'])) { $email = $_POST['email']; $message = $_POST['message']; $body = ' <html> <head> <title>Email With Image</title> <link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet"> </head> <body> <div style="margin:20px;padding:20px;font-size:16px;font-family:"Montserrat",sans-serif;border:2px solid #aaa;"> <h1 style="font-size:24px;font-weight:400;">Sending HTML Email With Image</h1> <img src="https://www.google.ca/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" /><br /> ' . $message . '<br /> </div> </body> '; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; $headers .= 'From: Example.com <[email protected]>' . "\r\n"; $subject = "HTML Mail"; $mail = mail($email, $subject, $body, $headers); if (!$mail) { echo "Mail was not successful"; } else { echo "Message successfully sent."; } } else { ?> <form action="index.php" method="post"> Email Address<br /> <input type="text" name="email" /><br /><br /> Message<br /> <textarea name="message"></textarea><br/><br /> <input type="submit" value="Submit" name="query" /> </form> <?php } ?>
comments: 0 / hits: 1110
PHP
3 years ago, sun, jan 20, 19, 8:37:34
<?php $string = '<?php /** * @author me * @copyright 2019 */ $foo = "Highlight String"; echo $foo; ?>'; echo '<pre style="line-height:18px;padding:5px;border:1px solid #aaa;max-width:600px;white-space:normal;background-color:#eff0f1;">'; highlight_string($string); echo '</pre>'; ?>
comments: 0 / hits: 979
PHP