How To Redirect to https in Apache Using mod_rewrite

Author: , November 17th, 2017

1 2 3 RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

How To Configure Apache 2.4 to Renew LetsEncrypt running WordPress and https

Author: , August 21st, 2017

This post does not cover configuring letsencrypt or ssl/https. First, make sure your LetsEncrypt configuration points to the actual WordPress document root directory cat /etc/letsencrypt/renewal/www.yourdomain.com.conf 1 2 3 4 … [[webroot_map]] yourdomain.com = /volumes/data/www/yourdomain.com/prod/wordpress www.yourdomain.com = /volumes/data/www/yourdomain.com/prod/wordpress … [[webroot_map]] yourdomain.com = /volumes/data/www/yourdomain.com/prod/wordpress www.yourdomain.com = /volumes/data/www/yourdomain.com/prod/wordpress Second, use the new macro language feature in Apache 2.4 […]

How To Redirect Back To The Referring Page After Login In WordPress

Author: , September 20th, 2012

1 <a href="<?php echo wp_login_url( get_permalink() ); ?>" title="Login">Login</a> <a href=”<?php echo wp_login_url( get_permalink() ); ?>” title=”Login”>Login</a> OR Add this code to your functions.php file in your WordPress theme… 1 2 3 4 5 6 7 8 if ( (isset($_GET[’action’]) && $_GET[’action’] != ‘logout’) || (isset($_POST[’login_location’]) && !empty($_POST[’login_location’])) ) {         add_filter(’login_redirect’, […]

How To Redirect To A New Page After A Delay Using Javascript

Author: , August 16th, 2011

1 2 3 setTimeout(function() {      window.location.href = "/index.html"; }, 4000); setTimeout(function() { window.location.href = “/index.html”; }, 4000);

Redirecting Using CGI.pm

Author: , October 7th, 2010

To generate a redirection header in CGI.pm use the following syntax where $q is the cgi handle: print $q->redirect(‘http://wyzaerd.com/documents/resume.pdf’); If you use redirection like this, you should not print out a header as well. You should always use full URLs (including the http: or ftp: part) in redirection requests. Relative URLs will NOT work correctly.

How to do Web Redirects in HTML, PHP and PERL CGI

Author: , November 9th, 2009

For PHP: [sourcecode language="php"] <?php header("HTTP/1.1 301 Moved Permanently"); header("Location: http://www.wyzaerd.com/index.html"); exit(); ?> [/sourcecode] For PERL: The fast way: [sourcecode language="perl"] #!/usr/bin/perl -Tw $|=1; use CGI; my $cgi_object = new CGI; my $new_page_url = qq~http://www.wyzaerd.com/index.html~; print $cgi_object->header(-expires=>"now",’Location’ => $new_page_url,); exit 0; [/sourcecode] OR The slow way: [sourcecode language="perl"] #!/usr/bin/perl -Tw $|=1; print qq#Content-Type: text/html; charset=ISO-8859-1\n\n<html> […]

Groovy

Author: , November 9th, 2009

So I have caught up on social matters via text and Facebook this morning. Have gotten the CHS/Rapida project underway – a promising beginning. Must do plans and emails… Did the shutdown page for a client today – made sure to do index.html, index.php and cgi-bin/index.cgi. Still looks good, just no guts anymore. Spoke to […]