HC Custom WP-Admin URL - Version 1.3.2

Version Description

  • Fixed small bug with server HTTPS
Download this release

Release Info

Developer SomeWebMedia
Plugin Icon 128x128 HC Custom WP-Admin URL
Version 1.3.2
Comparing to
See all releases

Code changes from version 1.3.1 to 1.3.2

Files changed (2) hide show
  1. hc-custom-wp-admin-url.php +10 -3
  2. readme.txt +69 -66
hc-custom-wp-admin-url.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: HC Custom WP-Admin URL
4
- Version: 1.3.1
5
  Plugin URI: http://wordpress.org/plugins/hc-custom-wp-admin-url/
6
  Description: Small and simple plugin that allows you to change url of wp-admin
7
  Author: Some Web Media
@@ -95,7 +95,13 @@ if (!class_exists('HC_CustomWPAdminURL')) {
95
  if (!session_id()) session_start();
96
  $url = $this->get_url();
97
  // see referal url by the web client
98
- list($file, $arguments) = explode("?", $_SERVER['REQUEST_URI']);
 
 
 
 
 
 
99
  // on localhost remove subdir
100
  $file = ($url['rewrite_base']) ? implode("", explode("/" . $url['rewrite_base'], $file)) : $file;
101
 
@@ -123,7 +129,7 @@ if (!class_exists('HC_CustomWPAdminURL')) {
123
  $url['scheme'] = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off" ? "https" : "http";
124
  $url['domain'] = $_SERVER['HTTP_HOST'];
125
  $url['port'] = isset($_SERVER["SERVER_PORT"]) && $_SERVER["SERVER_PORT"] ? $_SERVER["SERVER_PORT"] : "";
126
- $url['rewrite_base'] = ($host = explode( (($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != "off") ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'], get_bloginfo('url') ) ) ? preg_replace("/^\//", "", implode("", $host)) : "";
127
  $url['path'] = $url['rewrite_base'] ? implode("", explode("/" . $url['rewrite_base'], $_SERVER["SCRIPT_NAME"])) : $_SERVER["SCRIPT_NAME"];
128
  $url['query'] = $_SERVER['QUERY_STRING'];
129
  return $url;
@@ -173,3 +179,4 @@ if (!class_exists('HC_CustomWPAdminURL')) {
173
 
174
  }
175
 
 
1
  <?php
2
  /*
3
  Plugin Name: HC Custom WP-Admin URL
4
+ Version: 1.3.3
5
  Plugin URI: http://wordpress.org/plugins/hc-custom-wp-admin-url/
6
  Description: Small and simple plugin that allows you to change url of wp-admin
7
  Author: Some Web Media
95
  if (!session_id()) session_start();
96
  $url = $this->get_url();
97
  // see referal url by the web client
98
+ $request_uri = explode("?", $_SERVER['REQUEST_URI']);
99
+ if (isset($request_uri[1])) {
100
+ list($file, $arguments) = explode("?", $_SERVER['REQUEST_URI']);
101
+ } else {
102
+ $file = $_SERVER['REQUEST_URI'];
103
+ $arguments = '';
104
+ }
105
  // on localhost remove subdir
106
  $file = ($url['rewrite_base']) ? implode("", explode("/" . $url['rewrite_base'], $file)) : $file;
107
 
129
  $url['scheme'] = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off" ? "https" : "http";
130
  $url['domain'] = $_SERVER['HTTP_HOST'];
131
  $url['port'] = isset($_SERVER["SERVER_PORT"]) && $_SERVER["SERVER_PORT"] ? $_SERVER["SERVER_PORT"] : "";
132
+ $url['rewrite_base'] = ($host = explode( $url['scheme'] . "://" . $_SERVER['HTTP_HOST'], get_bloginfo('url') ) ) ? preg_replace("/^\//", "", implode("", $host)) : "";
133
  $url['path'] = $url['rewrite_base'] ? implode("", explode("/" . $url['rewrite_base'], $_SERVER["SCRIPT_NAME"])) : $_SERVER["SCRIPT_NAME"];
134
  $url['query'] = $_SERVER['QUERY_STRING'];
135
  return $url;
179
 
180
  }
181
 
182
+ ?>
readme.txt CHANGED
@@ -1,67 +1,70 @@
1
- === HC Custom WP-Admin URL ===
2
- Contributors: SomeWebMedia
3
- Tags: plugin, administration, admin, custom url, login, security, wp-admin, wp-login
4
- Requires at least: 3.2
5
- Tested up to: 3.5.1
6
- Stable tag: 1.3.1
7
- License: GPLv2 or later
8
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
-
10
- Small and simple security plugin that allows you to change url of wp-admin
11
-
12
- == Description ==
13
-
14
- Want to reduce the possibility of your website been hacked or hijacked?
15
-
16
- With this plugin you can change wp-admin and wp-login.php to any of your choice, making it impossible for the hackers to access your administration login page.
17
- Instead of `http://yourdomain.com/wp-admin/` and `http://yourdomain.com/wp-login.php` you can have `http://yourdomain.com/admin` or `http://yourdomain.com/banana`
18
-
19
- Its simple to use.
20
- New field will be added to **Settings** -> **Permalinks** section called **WP-Admin slug**. All you have to do is to write your desired WP Admin slug and save the settings.
21
-
22
- == Installation ==
23
-
24
- 1. Upload `hc-custom-wp-admin-url.php` to the `/wp-content/plugins/` directory
25
- 2. Activate the plugin through the 'Plugins' menu in WordPress
26
- 3. Go to Permalink Options page inside the administration area
27
- 4. Set the field **WP-Admin slug** to the desired one
28
-
29
- == Frequently Asked Questions ==
30
-
31
- = Does this work with Multisite =
32
- We don't know, but we'll look into it soon!
33
-
34
- = What about the default Admin URLs? =
35
-
36
- Old WP Admin urls `http://yourdomain.com/wp-admin/` and `http://yourdomain.com/wp-login.php` will not be usable until you clear the **WP-Admin slug** field from Permalink Options page or uninstal the plugin
37
-
38
- = Anything important I should know? =
39
-
40
- Be careful if using this plugin with other plugins which modify .htaccess file. Also if you are having trouble with your .htaccess file not being generated properly, try deleting it and re-saving Permalink options.
41
-
42
- == Screenshots ==
43
-
44
- 1. Blog Permalinks Options page, where you are able to set your custom URL
45
-
46
- == Changelog ==
47
-
48
- = 1.3.1 =
49
- * Fixed bug on some WordPress instances where there was a problem with getting the site home path
50
-
51
- = 1.3 =
52
- * Fixed redirection bug of password protected pages
53
-
54
- = 1.2 =
55
- * If WordPress for some reason haven't applied rewrite rules to .htaccess, default wp-admin url will work
56
-
57
- = 1.1.2 =
58
- * Fixed redirection bug when slug set to empty
59
-
60
- = 1.1 =
61
- * Fixed URL for "default" permalink settings
62
- * Fixed URL with trailing slash at the end
63
-
64
- = 1.0 =
65
- * Initial release
66
- * Sets basic login and admin redirects and checks
 
 
 
67
  * Able to change link through permalink options page
1
+ === HC Custom WP-Admin URL ===
2
+ Contributors: SomeWebMedia
3
+ Tags: plugin, administration, admin, custom url, login, security, wp-admin, wp-login
4
+ Requires at least: 3.2
5
+ Tested up to: 3.7.1
6
+ Stable tag: 1.3.2
7
+ License: GPLv2 or later
8
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
+
10
+ Small and simple security plugin that allows you to change url of wp-admin
11
+
12
+ == Description ==
13
+
14
+ Want to reduce the possibility of your website been hacked or hijacked?
15
+
16
+ With this plugin you can change wp-admin and wp-login.php to any of your choice, making it impossible for the hackers to access your administration login page.
17
+ Instead of `http://yourdomain.com/wp-admin/` and `http://yourdomain.com/wp-login.php` you can have `http://yourdomain.com/admin` or `http://yourdomain.com/banana`
18
+
19
+ Its simple to use.
20
+ New field will be added to **Settings** -> **Permalinks** section called **WP-Admin slug**. All you have to do is to write your desired WP Admin slug and save the settings.
21
+
22
+ == Installation ==
23
+
24
+ 1. Upload `hc-custom-wp-admin-url.php` to the `/wp-content/plugins/` directory
25
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
26
+ 3. Go to Permalink Options page inside the administration area
27
+ 4. Set the field **WP-Admin slug** to the desired one
28
+
29
+ == Frequently Asked Questions ==
30
+
31
+ = Does this work with Multisite =
32
+ We don't know, but we'll look into it soon!
33
+
34
+ = What about the default Admin URLs? =
35
+
36
+ Old WP Admin urls `http://yourdomain.com/wp-admin/` and `http://yourdomain.com/wp-login.php` will not be usable until you clear the **WP-Admin slug** field from Permalink Options page or uninstal the plugin
37
+
38
+ = Anything important I should know? =
39
+
40
+ Be careful if using this plugin with other plugins which modify .htaccess file. Also if you are having trouble with your .htaccess file not being generated properly, try deleting it and re-saving Permalink options.
41
+
42
+ == Screenshots ==
43
+
44
+ 1. Blog Permalinks Options page, where you are able to set your custom URL
45
+
46
+ == Changelog ==
47
+
48
+ = 1.3.2 =
49
+ * Fixed small bug with server HTTPS
50
+
51
+ = 1.3.1 =
52
+ * Fixed bug on some WordPress instances where there was a problem with getting the site home path
53
+
54
+ = 1.3 =
55
+ * Fixed redirection bug of password protected pages
56
+
57
+ = 1.2 =
58
+ * If WordPress for some reason haven't applied rewrite rules to .htaccess, default wp-admin url will work
59
+
60
+ = 1.1.2 =
61
+ * Fixed redirection bug when slug set to empty
62
+
63
+ = 1.1 =
64
+ * Fixed URL for "default" permalink settings
65
+ * Fixed URL with trailing slash at the end
66
+
67
+ = 1.0 =
68
+ * Initial release
69
+ * Sets basic login and admin redirects and checks
70
  * Able to change link through permalink options page