• Resolved Daniel

    (@junglized)


    Hi everybody,

    well as the title states I have a subdirectory WP network instalation installed in subdirectory: https://archeologia.uni.lodz.pl/nowaarcheologia. What I need is to:

    1. redirect from domain https://archeologia.uni.lodz.pl to above address, what is achieved actually by putting .htaccess file in root directory (looks like this):

    RewriteEngine on
    RewriteRule (.*) https://archeologia.uni.lodz.pl/nowaarcheologia/$1 [R=301,L]

    2. get rid of /nowaarcheologia/ from site address to make it look like domain address: https://archeologia.uni.lodz.pl instead of https://archeologia.uni.lodz.pl/nowaarcheologia. i have another .htaccess file in WordPress root folder this time (/nowaarcheologia/), which looks like this:

    <IfModule mod_rewrite.c>
    
    RewriteEngine On
    RewriteBase /nowaarcheologia/
    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).*) var/www/archeologia/nowaarcheologia/$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ var/www/archeologia/nowaarcheologia/$2 [L]
    RewriteRule . index.php [L]
    
    </IfModule>
    
    # END WordPress
    
    # END htaccess

    I searched the web for two days now and I can’t find an answer to my second question, maybe there is anybody who can actually help me?

    thanks in advance, Dan.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    2. get rid of /nowaarcheologia/ from site address to make it look like domain address: https://archeologia.uni.lodz.pl instead of https://archeologia.uni.lodz.pl/nowaarcheologia.

    So you want https://archeologia.uni.lodz.pl/nowaarcheologia to become https://archeologia.uni.lodz.pl but earlier you sent https://archeologia.uni.lodz.pl to https://archeologia.uni.lodz.pl/nowaarcheologia

    That will sort of circular redirection of course will not work. ??

    Why not just install WordPress in the root of your web server’s directory?

    Thread Starter Daniel

    (@junglized)

    Thanks for reply, I did install in root directory after no too successful playing with redirections, anyway, thanks very much for your help, Jan, grrets.

    Yes, it should really be in the root directory, especially in Multisite mode. Even if it’s unsuccessful at first, it’s the way to go. Creating all those redirects is only going to make matters more difficult.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Subdirectory wordpress installation in subdirectory’ is closed to new replies.