conker87 Posted June 23, 2010 Share Posted June 23, 2010 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 host. However, it brings up an internal server error. Can anyone see anything wrong with it? It was fine on my home server: 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] Quote Link to comment https://forums.phpfreaks.com/topic/205638-more-internal-fails-due-to-rewrite/ Share on other sites More sharing options...
wildteen88 Posted June 23, 2010 Share Posted June 23, 2010 If you can get access to your servers error log that will help to identify why your receiving the error. As you're using mod_rewrite just double check that the mod_rewrite module is enabled. Quote Link to comment https://forums.phpfreaks.com/topic/205638-more-internal-fails-due-to-rewrite/#findComment-1076144 Share on other sites More sharing options...
conker87 Posted June 24, 2010 Author Share Posted June 24, 2010 Well after further testing, all that was needed was to add the preceding file name to the referral, so: # 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] Cheers anyway guys. Quote Link to comment https://forums.phpfreaks.com/topic/205638-more-internal-fails-due-to-rewrite/#findComment-1076538 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.