SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    May 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Subfolder creation problem

    Hi,

    I'm trying to have a subfolder to put my own php files. (ie: mySubdirectory)

    My htaccess looks like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    I read everywhere, and people are saying to simply put
    RewriteCond %{REQUEST_URI} !^/(mySubdirectory|mySubdirectory/.*)$
    in there but its not working. I tried for 3 hours and im losing it lol

    My htaccess now looks like this.
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_URI} !^/(mySubdirectory|mySubdirectory/.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    I also tried putting an htaccess fil in the mySubdirectory folder like this:
    <IfModule mod_rewrite.c>
    RewriteEngine off
    </IfModule>

    And that didn't work either.

    Any suggestions?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,592
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Hi tzzoug. Welcome to the forums.

    May be a totally ignorant question, but what does htaccess have to do with this? Can't you just create your subfolder and move on?

  3. #3
    SitePoint Member
    Join Date
    May 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, when i put a subfolder with say "test.php" or "index.php" in it, it is showing me a 404 error page
    A lot of forums suggest that adding that line basically ignores that subdirectory as being part of wordpress and therefore allowing you to use it as you wish

  4. #4
    SitePoint Member
    Join Date
    May 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Like this for example
    http://www.lolzhumor.com/mySubdirectory/

    And thanks for the warm welcome

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,592
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Hm, I don't have much experience with WP, but I never had a problem adding extra directories outside of the WP files. Hopefully someone else will know what to do here.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •