Version Description
- Updated redirect method to send headers directly rather than using wp_redirect() because it was sending 302 codes on some servers
Download this release
Release Info
Developer | scottnelle |
Plugin | Simple 301 Redirects |
Version | 1.01 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.01
- readme.txt +7 -2
- wp-simple-301-redirects.php +3 -2
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: scottnelle
|
3 |
Tags: 301, redirect, url, seo
|
4 |
Requires at least: 1.5
|
5 |
-
Tested up to:
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
Simple 301 Redirects provides an easy method of redirecting requests to another page on your site or elsewhere on the web.
|
9 |
|
@@ -11,6 +11,8 @@ Simple 301 Redirects provides an easy method of redirecting requests to another
|
|
11 |
|
12 |
Simple 301 Redirects provides an easy method of redirecting requests to another page on your site or elsewhere on the web. It's especially handy when you migrate a site to WordPress and can't preserve your URL structure. By setting up 301 redirects from your old pages to your new pages, any incoming links will be seemlessly passed along, and their pagerank (or what-have-you) will be passed along with them.
|
13 |
|
|
|
|
|
14 |
== Installation ==
|
15 |
|
16 |
1. Upload Simple 301 Redirects to the `/wp-content/plugins/` directory
|
@@ -23,5 +25,8 @@ Simple 301 Redirects provides an easy method of redirecting requests to another
|
|
23 |
|
24 |
== Changelog ==
|
25 |
|
|
|
|
|
|
|
26 |
= 1.0 =
|
27 |
* Initial Release
|
2 |
Contributors: scottnelle
|
3 |
Tags: 301, redirect, url, seo
|
4 |
Requires at least: 1.5
|
5 |
+
Tested up to: 3.0
|
6 |
+
Stable tag: 1.01
|
7 |
|
8 |
Simple 301 Redirects provides an easy method of redirecting requests to another page on your site or elsewhere on the web.
|
9 |
|
11 |
|
12 |
Simple 301 Redirects provides an easy method of redirecting requests to another page on your site or elsewhere on the web. It's especially handy when you migrate a site to WordPress and can't preserve your URL structure. By setting up 301 redirects from your old pages to your new pages, any incoming links will be seemlessly passed along, and their pagerank (or what-have-you) will be passed along with them.
|
13 |
|
14 |
+
Note: The format for requests is '/about.htm' and the format for redirects is 'http://www.domain.com/about/' in order to emulate the way Apache handles 301 redirects and because while you can only accept requests to your site, you can redirect to anywhere.
|
15 |
+
|
16 |
== Installation ==
|
17 |
|
18 |
1. Upload Simple 301 Redirects to the `/wp-content/plugins/` directory
|
25 |
|
26 |
== Changelog ==
|
27 |
|
28 |
+
= 1.01 =
|
29 |
+
* Updated redirect method to send headers directly rather than using wp_redirect() because it was sending 302 codes on some servers
|
30 |
+
|
31 |
= 1.0 =
|
32 |
* Initial Release
|
wp-simple-301-redirects.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Simple 301 Redirects
|
4 |
Plugin URI: http://www.scottnelle.com/simple-301-redirects-plugin-for-wordpress/
|
5 |
Description: Create a list of URLs that you would like to 301 redirect to another page or site
|
6 |
-
Version: 1.
|
7 |
Author: Scott Nellé
|
8 |
Author URI: http://www.scottnelle.com/
|
9 |
*/
|
@@ -124,7 +124,8 @@ if (!class_exists("Simple301redirects")) {
|
|
124 |
foreach ($redirects as $storedrequest => $destination) {
|
125 |
// compare user request to each 301 stored in the db
|
126 |
if($userrequest == rtrim($storedrequest,'/')) {
|
127 |
-
|
|
|
128 |
exit();
|
129 |
}
|
130 |
else { unset($redirects); }
|
3 |
Plugin Name: Simple 301 Redirects
|
4 |
Plugin URI: http://www.scottnelle.com/simple-301-redirects-plugin-for-wordpress/
|
5 |
Description: Create a list of URLs that you would like to 301 redirect to another page or site
|
6 |
+
Version: 1.01
|
7 |
Author: Scott Nellé
|
8 |
Author URI: http://www.scottnelle.com/
|
9 |
*/
|
124 |
foreach ($redirects as $storedrequest => $destination) {
|
125 |
// compare user request to each 301 stored in the db
|
126 |
if($userrequest == rtrim($storedrequest,'/')) {
|
127 |
+
header ('HTTP/1.1 301 Moved Permanently');
|
128 |
+
header ('Location: ' . $destination);
|
129 |
exit();
|
130 |
}
|
131 |
else { unset($redirects); }
|