+ Reply to Thread
Results 1 to 3 of 3

Thread: mod_rewrite internal errors.

  1. #1
    conker87 is offline x10Hosting Member conker87 is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    UK
    Posts
    65

    mod_rewrite internal errors.

    I've been using the following code in my .htaccess file on my home server since I started changing my site. Now that the servers are back up, I've put all it all on my x10 hosting. However, it brings up an internal server error. Can anyone see anything wrong with it? It was fine on my home server:

    Code:
    RewriteEngine On
    
    RewriteRule ^assets/ - [L]
    #RewriteRule ^assets/css/.*$ [PT]
    #RewriteRule ^assets/dynamic/.*$ [PT]
    #RewriteRule ^assets/images/.*$ [PT]
    #RewriteRule ^assets/inc/.*$ [PT]
    #RewriteRule ^assets/php/.*$ [PT]
    #RewriteRule ^assets/podcasts/.*$ [PT]
    #RewriteRule ^assets/podcasts/will\+game\+for\+gold/.*$ [PT]
    #RewriteRule ^assets/podcasts/tunnelcast/.*$ [PT]
    #RewriteRule ^assets/podcasts/inessence/.*$ [PT]
    #RewriteRule ^assets/twitter/.*$ [PT]
    
    # Accounts
    RewriteRule ^account/panel/([^/]*)$ /?account=panel&area=$1 [L]
    RewriteRule ^account/profile/([^/]*)$ /?account=profile&id=$1 [L]
    RewriteRule ^account/([^/]*)$ /?account=$1 [L]
    RewriteRule ^account/([^/]*)/([^/]*)$ /?account=$1&code=$2 [L]
    
    # Admin
    RewriteRule ^admin/([^/]*)$ /?admin=$1 [L]
    RewriteRule ^admin/([^/]*)/([^/]*)$ /?admin=$1&id=$2 [L]
    
    # Pagination
    RewriteRule ^p/([^/]*)$ /?p=$1 [L]
    
    # Search
    RewriteRule ^search/([^/]*)$ /?search=$1 [L]
    RewriteRule ^search-type/([^/]*)$ /?search-type=$1 [L]
    RewriteRule ^search-tags/([^/]*)$ /?search-tags=$1 [L]
    RewriteRule ^search-category/([^/]*)$ /?search-category=$1 [L]
    
    # Pages
    RewriteRule ^([^/]*)\.html$ /?page=$1 [L]
    
    # Content
    RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ /?type=$1&category=$2&title=$3 [L]
    
    # Feed
    RewriteRule ^feed-type/([^/]*)\.rss$ /assets/feed/new.php?type=$1 [L]
    RewriteRule ^feed-category/([^/]*)\.rss$ /assets/feed/new.php?category=$1 [L]
    RewriteRule ^feed.rss$ /assets/feed/new.php [L]

  2. #2
    dlukin is offline x10 Lieutenant dlukin is on a distinguished road
    Join Date
    Oct 2009
    Posts
    427

    Re: mod_rewrite internal errors.

    First page of cPanel --> Error Log will contain errors if your .htaccess contains syntax errors.

    Try adding

    RewriteBase /

    to the top of the file. (this is because of the mappings of paths in the new configuration)

  3. #3
    conker87 is offline x10Hosting Member conker87 is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    UK
    Posts
    65

    Re: mod_rewrite internal errors.

    Hmm, I've added in the Base, but still no luck.

    I've also checked the error log and there's nothing there other than 404 errors when looking for a 404 document (irony there).

    ---------- Post added at 03:41 PM ---------- Previous post was at 03:24 PM ----------

    Oh God, massive fail on my part. Remember that you NEED to put in the file name of the index, the following works great:

    Code:
    RewriteEngine On
    RewriteBase /
    
    RewriteRule ^assets/ - [L]
    #RewriteRule ^assets/css/.*$ [PT]
    #RewriteRule ^assets/dynamic/.*$ [PT]
    #RewriteRule ^assets/images/.*$ [PT]
    #RewriteRule ^assets/inc/.*$ [PT]
    #RewriteRule ^assets/php/.*$ [PT]
    #RewriteRule ^assets/podcasts/.*$ [PT]
    #RewriteRule ^assets/podcasts/will\+game\+for\+gold/.*$ [PT]
    #RewriteRule ^assets/podcasts/tunnelcast/.*$ [PT]
    #RewriteRule ^assets/podcasts/inessence/.*$ [PT]
    #RewriteRule ^assets/twitter/.*$ [PT]
    
    # Accounts
    RewriteRule ^account/panel/([^/]*)$ /index.php?account=panel&area=$1 [L]
    RewriteRule ^account/profile/([^/]*)$ /index.php?account=profile&id=$1 [L]
    RewriteRule ^account/([^/]*)$ /index.php?account=$1 [L]
    RewriteRule ^account/([^/]*)/([^/]*)$ /index.php?account=$1&code=$2 [L]
    
    # Admin
    RewriteRule ^admin/([^/]*)$ /index.php?admin=$1 [L]
    RewriteRule ^admin/([^/]*)/([^/]*)$ /index.php?admin=$1&id=$2 [L]
    
    # Pagination
    RewriteRule ^p/([^/]*)$ /index.php?p=$1 [L]
    
    # Search
    RewriteRule ^search/([^/]*)$ /index.php?search=$1 [L]
    RewriteRule ^search-type/([^/]*)$ /index.php?search-type=$1 [L]
    RewriteRule ^search-tags/([^/]*)$ /index.php?search-tags=$1 [L]
    RewriteRule ^search-category/([^/]*)$ /index.php?search-category=$1 [L]
    
    # Pages
    RewriteRule ^([^/]*)\.html$ /index.php?page=$1 [L]
    
    # Content
    RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ /index.php?type=$1&category=$2&title=$3 [L]
    
    # Feed
    RewriteRule ^feed-type/([^/]*)\.rss$ /assets/feed/new.php?type=$1 [L]
    RewriteRule ^feed-category/([^/]*)\.rss$ /assets/feed/new.php?category=$1 [L]
    RewriteRule ^feed.rss$ /assets/feed/new.php [L]
    Last edited by conker87; 06-23-2010 at 09:42 AM.

+ Reply to Thread

Similar Threads

  1. Internal Server Errors
    By youngc2010 in forum Free Hosting
    Replies: 1
    Last Post: 02-11-2010, 12:51 PM
  2. Internal Server Error and Errors in cpanel
    By sabinkumar in forum Free Hosting
    Replies: 7
    Last Post: 11-23-2008, 10:57 PM
  3. Internal Server Errors
    By ghardin in forum Free Hosting
    Replies: 5
    Last Post: 09-11-2007, 08:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers