How to redirect WordPress from subdomain to root [while still in secret dir.]?
-
Hallo,
I need help with a problem that I am unable to resolve on my own, despite all my efforts.The problem is that I want to protect myself against various ‘script-kiddie’ types of attacks, partially by giving WordPress its own [hidden] directory, more at:
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
Now, I want to do this, but I want not to just have wordpress in example.com/secretdir but in secretdomain.example.com/secretdir and I want its domain/url to be [appear to be] at example.com
So, for example – lets think that my WP install is at
blog.amazing.com/secretblog
Now, I want my url to *appear* to be amazing.com
So, I want that sort of thing that is described at
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
but to be it like 2-level, so not only to have secret subfolder where wp is installed, but to have secret subdomain AND secret subfolder WITHIN that subdomain and I still want my wp address to look like my wp is installed in root.
I am assuming, I have to do the following from here
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
“… Open your root directory’s index.php file in a text editor
Change the following and save the file.
Change the line that says:
require(‘./wp-blog-header.php’);
to the following, using your directory name for the WordPress core files:
require(‘./wordpress/wp-blog-header.php’);….”Now, I am not sure what to put here:
“require(‘./wordpress/wp-blog-header.php’);”
– because my wp is not just a directory away, but the whole subdomain AND the directory.
Structure of my FTP:
There are 2 important directories ‘web’ and ‘sub’
Now, ‘web’ is the root directory – stuff in there will appear under example.com
Than, ‘sub’ is the directory where I can create subdomains, so for example – when I create a directory called ‘blog’ under /sub its address will be blog.example.com
Now, what is my route if my WP install is at /sub/blog/wpsecret [but publicly it is blog.example.com/wpsecret and I want to have it appear at example.com BUT LEAVE MY WP INSTALL AT blog.example.com/wpsecret …?
Thanks in advance for any bit of advice,
- The topic ‘How to redirect WordPress from subdomain to root [while still in secret dir.]?’ is closed to new replies.