WordPress.org

Ready to get started?Download WordPress

Forums

WordPress needs to change the way it uses .htaccess (5 posts)

  1. mdvaldosta
    Member
    Posted 8 years ago #

    Seriously, I love WordPress but probably will have to remove it from a few of my sites. The interface and templating system is top notch, but because it cause SOOOOOOOOOO many problems when trying to use friendly urls, it's just not working out.

    I see a ton of unresolved .htaccess related problems, and have some of my own. Why does WordPress use such a greedy rewriting system? Why can't WordPress use .htaccess like everyone else?

    1. It took me an hour of searching to figure out why my forums (in the /forums/) directory quit working... well WordPress kept trying to rewrite all the forum posts (I was using rewriting on them too)... so I finally found a workaround to keep WP out of that directory... but that shouldn't be necessary.

    2. 404 pages... I just can't get them to work. When I first setup the WP 404 page it was fine, then the next day they stop working. It's not a fastCGI thing (yea I had to spend more time digging for a workaround again), I have no clue how to fix it. I just can't get the 404 page to show up, even why I type the path to the 404 in my template directly (it get's 404'd).

    The bottom line is, all these problems (and probably more if or when I ever get those fixed) are becase WordPress has a screwed up way of rewriting URL's. Why can't it use rewrite rules like all the other software? Why be different? Why cause so many conflicts with other rewrite rules?

    This is the bane of WP...

  2. Yansky
    Member
    Posted 8 years ago #

    Did you add the necessary rules to the .htaccess file?

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR]
    RewriteCond %{REQUEST_URI} ^/failed_auth.html$
    RewriteRule ^.*$ - [L]
    </IfModule>
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

  3. mdvaldosta
    Member
    Posted 8 years ago #

    Yes, I did this to stop WP from taking over my forums directory, mine looks like this:

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

    But, I still can't get my 404 to work - and the weird thing is it worked when I first set it up. I've tried the 404 line before and after the wordpress .htaccess and still nothing.

    Nevertheless, none of this stuff would be necessary if WP wasn't so greedy with the .htaccess.

  4. manstraw
    Member
    Posted 8 years ago #

    I use the rewrite rules for a varity of sites, and never have a problem. But I also put the blog in it's own directory, where it should be if you're going to mix it with other software/pages. You have your forum in it's own directory right? Is there a reason you don't want to do the same for wordpress?

    Here's what I typically do. Perhaps it will be useful for you. I put wordpress in it's own dir. I turn on permalinks, and let it makes it's own .htaccess in it's dir. In the root dir (up one level), I put something like this for .htaccess.

    Options +FollowSymlinks
    RewriteEngine On

    RewriteRule ^$ /wordpress/ [R]
    RewriteRule ^/(.*)$ /wordpress/&$1

    That could be expanded if you wanted to redirect specific pages, but basically, if someone goes to yourdomain.com, they plop into your wordpress blog. You can still have a separate index.html or index.php in the root html dir and it will work fine.

    Does this help you?

  5. Yansky
    Member
    Posted 8 years ago #

    From your other post it seems like you have phpBB installed seperately from wordpress.
    http://wordpress.org/support/topic/71864?replies=2

    There are some wordpress sites that have managed to integrate phpBB into wordpress itself. Perhaps that option may work better for you:

    http://wordpress.org/search/phpbb?forums=1

Topic Closed

This topic has been closed to new replies.

About this Topic