Vehicle_URLs_By_VIN::add_vin_rewrite()

add_vin_rewrite


Description Description

Adds a rewrite rule to parse URLs like <a href="http://localhost/vin/JM1NB354940406328/">http://localhost/vin/JM1NB354940406328/</a>


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class-vehicle-urls-by-vin.php

		function add_vin_rewrite() {
			//allow VINs as short as five digits because classic cars
			add_rewrite_rule( '^vin/([A-Z0-9]{5,17})/?$', 'index.php?vin=$matches[1]', 'top' );
		}