[wd_asp elements=’search’ ratio=’100%’ id=1]

Run wordpress from a directory

24th October 2013

Admin WP

wordpress category

To run wordpress from a directory add this htaccess file in the root

RewriteEngine on

# Dont apply to URLs that go to existing files or folders.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Only apply to URLs that arent already under /secondfolder
RewriteCond %{REQUEST_URI} !^/secondfolder/

# Rewrite all those to insert /secondfolder
RewriteRule ^(.*)$ /secondfolder/$1

# Redirect the root folder.
RewriteCond %{HTTP_HOST} ^(www.)?drax.neq3.com$
RewriteRule ^(/)?$ secondfolder/ [L]

Then to login to the second admin panel use this code

BUT remember, after logging in and doing what you need, take this code off, as it will be shown in the URL. So only add this when needed.