Quantcast
Channel: Topic Tag: plugin | WordPress.org
Viewing all articles
Browse latest Browse all 26892

onetarek on "How to detect if WP is installed in a sub directory ?"

$
0
0

I am developing a plugin
with plugin activation hook, It creates a .htaccess file dynamically in wp-content directory.

If website url is example.com then
in my .htaccess file I write a line : RewriteBase /wp-content/mydir

but when website url is example.com/blog/ then I have to write in .htaccess : RewriteBase /blog/wp-content/mydir

Now my question , how can I detect this directory name 'blog'


Viewing all articles
Browse latest Browse all 26892

Trending Articles