Remove subfolder name from url in wordpress as a subdomain

admin

Administrator
Staff member
Here's the deal... in a shared hosting, I created a subdomain like blog.mydomain.com in order to install wordpress, when i did that in cpanel it created a subfolder inside the root like public/blog.
So the installation goes well but, when I visit <strong>blog.mydomain</strong> url, it changes to <strong>blog.mydomain.com/blog</strong> I wanna remove the last <em>/blog</em>, also it shows Can't find the page, but not as a error just like a post that doesn't exists.

In the codex page from wordpress it says that the first thing to do is go to dashboard > general panel and change the <strong>box for WordPress address (URL)</strong> and the <strong>box for Site address (URL)</strong> but in my general panel settings this options does not show up, I belive this is a thing from the installation.

I'm guessing that I can accomplish this from the .htaccess, btw here's the one that wordpress created:

Code:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

Do I have to modify this .htaccess?? if so, how to do that?? or the one in the root folder, considering that the root one is for a laravel application which resides in the main domain.

This is the main .htaccess

Code:
&lt;IfModule mod_rewrite.c&gt;
#LARAVEL
    Options -MultiViews
    RewriteEngine On

    RewriteRule ^(.*)/$ /$1 [L,R=301]

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
#END LARAVEL

&lt;/IfModule&gt;

Hope someone can help me, Thanx...