• Resolved Jimmyfrantic

    (@jimmyfrantic)


    Hello!

    I recently replaced old, static version of my site with new, based on WordPress of course.

    The problem is – I had several working subdirectories on my server before, for example:

    https://www.name.com/sub1
    https://www.name.com/sub2

    Now, given that I have permalinks enabled, accessing them is not possible anymore, since I get 404 error inside WordPress.

    I read somewhere that I need to do something with disabling rewriting module in .htaccess yadda yadda yadda… The problem is, my WordPress is currently inside the direcotry named, well… “wordpress”…

    So my .htaccess essentially redirects everyone entering www.name.com to www.name.com/wordpress with hiding the subdirectory, so even though they’re in “wordpress” subdirectory, browser displays root in address bar… I wanted to have a clean address while maintaining a clean order of directories in my FTP root. So, how to access other subdirectories now, when, I suppose, disabling RewriteEngine is not an option?

    Thanks in advance!

    Jakub

    EDIT:

    I have the following in my .htaccess in root:

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

    What should I add here to make www.name.com/important_subdirectory redirected to www.name.hosting.com/important_subdirectory? I found that entering the full site address with hosting name bypasses the .htaccess and displays the subdirectory properly.

    Would it do a trick?

    EDIT2: RESOLVED

    RedirectMatch 301 ^/important_subdirectory$ https://www.name.hosting.com/important_subdirectory/

    I hope someone will find it useful.

  • The topic ‘How to gain access to non-WordPress subdirectory’ is closed to new replies.