YOURLS-PV .htaccess Cheat Sheet

with 1 Comment

Welcome to the easy .htaccess guide for YOURLS-PV.  In YOURLS-PV, running on an Apache Server, the configuration settings are found in three or four places.

  • httpd.conf or apache2.conf – you won’t usually have access to these on shared hosting.
  • The YOURLS Site Configuration File called something like /user/example.com-config.php (example.com would be replaced by your domain name, see YOURLS-PV Configuration for more information).
  • The MultiSite Default Configuration File called /user/multisite-config.php and is optional for Default Settings..
  • The Apache .htaccess File –  Some call it Magic, Others call it VooDoo!

This Cheat Sheet is designed to help you properly configure the Apache .htaccess file for different YOURLS configurations.

 

Basic .htaccess File

Here is the basic .htaccess for YOURLS–PV.

# BEGIN YOURLS
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

RewriteRule . yourls/yourls-loader.php [L]
# END YOURLS

 

Basic Usage

Use this configuration whenever YOURLS-VP is used by itself, with NO WordPress, including a Single Site or MultiSite.

 

Important Points

In this example, YOURLS-PV was loaded into a directory called /yourls/.  If you loaded it into a different directory, as you might do to replace a former subdirectory install, then you will need to replace the /yourls/ directory in

RewriteRule . yourls/yourls-loader.php [L]

With the directory you are using, perhaps /s/ (for Short)  or /e/ (for Exit).

Like this for the /s/ directory:

RewriteRule . s/yourls-loader.php [L]

Or this for the /e/ directory:

RewriteRule . e/yourls-loader.php [L]

 

WordPress Basics

Coming Soon

 

Advanced WordPress

Running both WordPress and YOURLS-PV in the root directory, without conflict.  This includes WordPress MultiSite Subdomains running with YOURLS-PV MultiSite!  You can also run the WP Multi Network Plugin (also on WP.org).

Note: WordPress MultiSite Subdirectories is NOT Supported.

Under Construction

 

HTTPS for Admin Server Only

This allows the Redirect Server to run in HTTP, but runs the Admin Server in HTTPS for greater security.

Under Construction

 

Additional .htaccess

 

No www

WWW is a waste of time and resources and is environmentally unfriendly and economically wasteful!

Still Baking

 

Encryption Everywhere

Encryption Everywhere means always use HTTPS!

Half-Cooked

 

More to Come!

Check Back Often!

 

You may also make suggestions in the comments.

One Response

  1. Configuration - YOURLS-PV
    | Reply

    […] .htaccess Cheat Sheet […]

Leave a Reply