WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] Subdirectory Problems (48 posts)

  1. darcmosch
    Member
    Posted 3 years ago #

    I am having trouble setting up my network. Every site I cannot get to the front or backend of any of my subdirectory sites. All the themes uploaded correctly and everytime I navigate I get a 404 Error and Object Not Found. I am sure the answer is on here somewhere but I cannot find what is my problem. I hope to hear from someone soon. Thanks

  2. Did you pick subdomains or subfolders?

  3. darcmosch
    Member
    Posted 3 years ago #

    Oh, yes I forgot to mention I sm doing it on XAMPP on a localhost. I am pretty sure from reading about this problem that it is an htaccess problem but I'm not sure how to fix it exactly. In my XAMPP htaccess is in a separate folder called "forbidden" which I think is what is causing the problem but am not sure how to go about fixing it.

  4. You need to create a NEW htaccess file in the same folder where the wp-config file is and paste in the lines the network setup gave you.

  5. darcmosch
    Member
    Posted 3 years ago #

    Ok, I figured it was something like that, so my htaccess file should say:

    AuthType Basic
    AuthName "FORBIDDEN AREA"
    AuthUserfile "../htdocs/forbidden/.htpasswd"
    Require valid-user
    
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
  6. darcmosch
    Member
    Posted 3 years ago #

    Last time I did just that, it said that it could not connect to my localhost

  7. AuthType Basic
    AuthName "FORBIDDEN AREA"
    AuthUserfile "../htdocs/forbidden/.htpasswd"
    Require valid-user

    Remove that part.

  8. darcmosch
    Member
    Posted 3 years ago #

    Ok, I'm almost there! I can now access the sites but only the HTML shows up no images, CSS, JS, etc.

  9. The htaccess file is not being read properly. talk to your host so they can kick the box into submisison.

  10. darcmosch
    Member
    Posted 3 years ago #

    even if it is localhost?

  11. Then it's not reading your .htaccess correctly. Make sure allowOverride is set to All on your httpd.conf (or whatever passes for that with XAMMP)

  12. darcmosch
    Member
    Posted 3 years ago #

    Ok, I thought I did that, here's my httpd.conf file:

    [Large code excerpt removed by moderator per forum rules. Please use the pastebin for all large code excerpts. It works better anyway.]

  13. "AllowOverride FileInfo Options" is what you need.

  14. darcmosch
    Member
    Posted 3 years ago #

    Ok, so do I replace both of these or either?

    Options Indexes FollowSymLinks Includes ExecCGI
    
        #
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        #
        AllowOverride All
    
        #
        # Controls who can get stuff from this server.
        #
        Order allow,deny
        Allow from all
    
    </Directory>

    OR

    #
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        #
        AllowOverride All
    
        #
        # Controls who can get stuff from this server.
        #
        Order allow,deny
        Allow from all
    
    </Directory>
  15. You need to use CODE tags (the back ticks, it's the tilde key to the left of the number 1 on most keyboards) to show code.

    Do you mean you have two of those calls in your httpd.conf? What's the top <Directory...> stuff say?

  16. darcmosch
    Member
    Posted 3 years ago #

    <Directory />
        Options FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
    </Directory>

    Here is the top directory

  17. Use Code Tags, please :) Swear to pogo sticks, it helps us ;)

    Change AllowOverride None to AllowOverride All for grins and giggles.

  18. darcmosch
    Member
    Posted 3 years ago #

    Ok, got it. I'm new here glad you let me know the proper way :) but that is the only line I need to change?

  19. Possibly. Won't know till you try! (Sometimes servers need other changes, sometimes they don't. Every server is a snowflake.)

  20. darcmosch
    Member
    Posted 3 years ago #

    a snowflake huh? That reference never comes with good stories D=

  21. Heh. I mean each server is different (like a snowflake). No two are 100% alike. Statistical impossibility. Thus I like to remind people that the reason there isn't always one perfect answer is because of that individuality.

  22. darcmosch
    Member
    Posted 3 years ago #

    All of my AllowOverride's are set to Allow.

  23. And?

  24. darcmosch
    Member
    Posted 3 years ago #

    Lol sorry and i am only seeing the HTML

    *Edit*
    What all do you need from me to fix this problem? I know it has something to do with httpd.conf or .htaccess

  25. Check your .htaccess against http://codex.wordpress.org/Create_A_Network#.htaccess_and_Mod_Rewrite

    As for httpd.conf, I'm looking for my notes. I need to keep them more handy, but I think you may need to kick the options some.

  26. darcmosch
    Member
    Posted 3 years ago #

    Here is what it says. The last couple of lines look different, but they are what my WP install says I need for it.

    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
  27. By 'compare' I meant you could do that on your own ;)

    .htaccess is fine.

  28. darcmosch
    Member
    Posted 3 years ago #

    Would it make more sense if I told you that I barely know what I am doing right now? I don't know server language all that well, which is why it seems that I am asking a ton of stupid questions, but we all got to start somewhere right? I guess the only other culprit would be my httpd.conf file?

  29. darcmosch
    Member
    Posted 3 years ago #

    Here is my httpd.conf, whatever good that'll do

    <script src="http://pastebin.com/embed_js.php?i=sr1W6g1X"></script>

  30. Heh. No shame in being new. I did guess that ;)

    I'm pretty sure it's the httpd.conf, but I'm not as well versed in that as I should be, so I'm rooting around trying to remember what Andrea said. I think you have to add Options Indexes FollowSymLinks below the AllowOverride line.

Topic Closed

This topic has been closed to new replies.

About this Topic