WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] big trouble with redirecting (4 posts)

  1. oblaum
    Member
    Posted 1 year ago #

    i've created successfully a network site based on subfolders (/en/ and /de/)
    then i just wanted that all visitors will see the /en/ version instead of /
    so i replaces my preview index.html on the root with a index.php with a redirect to /en/

    but then i am facing big trouble that my site /en/ is not showing - instead a 404 page.
    so i removed the index.php and use again the index.html as a preview.
    did not solve my problem.

    HELP

    i cleared all cashes and cookies and uses different browsers.

    http://opensmjle.com/en/
    strangely i can still access /en/wp-admin/

    i have turned on wordpress debug mode. got these two errors (maybe they have been there before)

    Notice: load_plugin_textdomain was called with an argument that is deprecated since version 2.7 with no alternative available. in /usr/www/users/opensmk/wp-includes/functions.php on line 2925
    
    Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/opensmk/wp-includes/functions.php:2925) in /usr/www/users/opensmk/wp-includes/pluggable.php on line 876

    thanks
    oli

    ps
    my .htaccess file:

    ## redirect all to opensmjle.com without www
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.opensmjle\.com [NC]
    RewriteRule ^(.*)$ http://opensmjle\.com/$1 [L,R=301]
    
    RewriteCond %{HTTP_HOST} ^www\.opensmjle\.de [NC]
    RewriteRule ^(.*)$ http://opensmjle\.com/$1 [L,R=301]
    
    RewriteCond %{HTTP_HOST} ^www\.opensmile\.com [NC]
    RewriteRule ^(.*)$ http://opensmjle\.com/$1 [L,R=301]
    
    RewriteCond %{HTTP_HOST} ^www\.smjle\.de [NC]
    RewriteRule ^(.*)$ http://opensmjle\.com/$1 [L,R=301]
    
    #redirect imprint
    RewriteRule ^imprint[/]?$ http://opensmjle.com/en/ [R=301,L]
    
    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]
  2. That's not a 'problem' thats you trying to make WP do something it's not supposed to do :)

    i've created successfully a network site based on subfolders (/en/ and /de/)
    then i just wanted that all visitors will see the /en/ version instead of /

    Two options:

    1) Switch the sites (requires a little mySQL savvy - Read http://halfelf.org/ebooks/wordpress-multisite-110/ page 81 - the ebook is Pay What You Want)

    2) Make the / site have a static front page that redirects.

  3. oblaum
    Member
    Posted 1 year ago #

    thanks mike.

    i've reinstalled the whole system in the meantime and created a 301 redirect in the htaccess file. it now works. so i have my wanted /en/ and /de/ folder.
    i wounder how it is solved normally?

  4. Option 1 in my previous answer, normally.

Topic Closed

This topic has been closed to new replies.

About this Topic