KVSun / KV-Sun-WP

A custom WordPress theme for the Kern Valley Sun
0 stars 2 forks source link

Rewrite old site URLs #34

Closed shgysk8zer0 closed 8 years ago

shgysk8zer0 commented 8 years ago

A link such as http://www.kernvalleysun.com/news/meet-wendy-reed/article_f65b42d8-8507-11e6-900d-b7771f19d999.html should translate to https://kernvalleysun.com/news/meet-wendy-reed.

Something along the lines of:

preg_replace('\[w\-]+\.html$/', null, $url)
shgysk8zer0 commented 8 years ago

I'll need to figure out the formatting of new and old URIs as well as how to distinguish a request for an old article.

Do not want to create a redirect loop. Can probably check that it ends with all that garbage ending in .html