Main site Display subdirectory in URL

My main site displays (mypage.com/site), and all of the following pages include / site, and How can I reach (mypage.com) and not display the subdirectory?

I tried to remove / site in the URL of the site address in the Wordpress settings. But he broke my login and disconnected me from logging in.

What should I do to delete the subdirectory / site directory folder on my website?

What should I do in the htaccess file?

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /site/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /site/index.php [L]
</IfModule>

# END WordPress
+3
source share
2 answers

I assumed that your WordPress installation is under the / site folder. If this is true, you can do this:

URL- , http://mypage.com (/), index.php ( site/) .

index.php , site/ wp-blog-header.php:

require( dirname( __FILE__ ) . '/site/wp-blog-header.php' );

: " " WordPress docs: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

+2

Apache?

- :

DocumentRoot /path/to/your/site

, , , .

, - .

0
source

All Articles