Hello and welcome to our community! Is this your first visit?
Register
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
    Location
    N/A
    Posts
    14,858
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1

    htaccess in root conflicts with that of wordpress

    Hi all,

    I've an htaccess in root like
    Code:
    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
    Code:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /events/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /events/index.php [L]
    </IfModule>
    
    # 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 11:12 AM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


 

Posting Permissions

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