WordPress.org

Forums

Hide Subdirectory wordpress is installed in on address bar (3 posts)

  1. ryanamorris
    Member
    Posted 1 year ago #

    Hello,

    I have wordpress installed in this directory and domain

    theblogfordads.com/tbfd/

    my htaccess file reads so

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?theblogfordads.com$
    RewriteRule ^(/)?$ tbfd [L]

    i want to mask the subdirectory so when you type in http://www.theblogfordads.com you dont see the /tbfd/

    can anyone help? ive done it a few ways that work but it does not let me in admin that way

  2. ryanamorris
    Member
    Posted 1 year ago #

    so i changed this to

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?theblogfordads.com$
    RewriteRule ^(/)?$ tbfd/$1 [L]

    it works but is there a way to make

    http://www.theblogfordads.com/tbfd/

    not accessable if u type that in it will still show the dir

  3. Sandeep Raman
    Member
    Posted 1 year ago #

    To give WP it's own dir:
    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    Your site still has urls configured for subdomain. You need to work on the site as per the above article link.

    For the subdirectory direct URL, redirect it back to the domain
    RedirectMatch 301 ^/tbfd/$ http://theblogfordads.com/

Topic Closed

This topic has been closed to new replies.

About this Topic