Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Thanked 2,250 Times in 2,237 Posts

    htaccess in root conflicts with that of wordpress

    Hi all,

    I've an htaccess in root like
    RewriteEngine On
    Options -Indexes
    Options +FollowSymlinks
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !=/favicon.ico
    RewriteRule ^(.*)$ index.php?page=$1 [L]
    to handle all requests in index.php of root directory.

    There is a wordpress module inside the /events directory, which has another htaccess like
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /events/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /events/index.php [L]
    # END WordPress
    Everything is fine if I make requests like http://www.example.com/events/ (with a trailing slash), but I get 500 Error - Internal Server Error when I try to access the page like http://www.example.com/events (with no slash at the end)

    What could be the reason? Can I write another rule to tell the system to consider /events like /events/?

    Any help would be highly appreciated.

    Edit: I removed the forced www rule for the time being
    Last edited by abduraooft; 08-13-2008 at 12:12 PM.


Posting Permissions

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