Mod rewrite - results in Error 500, Internal server error

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
sanjay
Forum Members
Forum Members
Posts: 19
Joined: Fri Oct 15, 2004 7:28 am

Mod rewrite - results in Error 500, Internal server error

Post by sanjay »

Hi all,

I'm trying to use mod-rewrite on this domain - http://animalwelfare.agnutrilink.net/  - clicking the links result 500 server errors.

I'm using CMSMS 1.0.2 - Apache - PHP 5 and MYSQL - versions link: http://faq.1and1.com/miscellaneous/17.html

This is my ISP's mod rewrite link:

http://faq.1and1.com/scripting_language ... ess/4.html

My config urls section and .htaccess : http://cmsmadesimple.org/pastebin/355

I tried to put #s in front of the 3 items under the 301 redirect (a suggestion on irc) but no sucess.

Any help will be appreciated.

~sanjay
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Mod rewrite - results in Error 500, Internal server error

Post by tsw »

I suppose that paste had some config.php content too? (if that was a full copy paste from your .htaccess remove all php code from .htaccess)

another thing might be

Options +FollowSymLinks

not all hosts allow this directive try disabling that line.

hope this helps
sanjay
Forum Members
Forum Members
Posts: 19
Joined: Fri Oct 15, 2004 7:28 am

Re: Mod rewrite - results in Error 500, Internal server error

Post by sanjay »

Thanks for the suggestions on the forum and IRC....  here's the fix  :) 

'm not sure why this worked... I scanged the page extension from '/' to '.html' - I had seen .html being used by another CMSMS site and tried it. I hope that won't cause problems else where.

http://animalwelfare.agnutrilink.net/ 

#-------------------------------
#URL Settings  --  in config.php
#-------------------------------

#Show mod_rewrite URLs in the menu? You must enable 'use_hierarchy' for this to work for modules
$config['assume_mod_rewrite'] = true;

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.html';

#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism?  This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = false;

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;

#If using none of the above options, what should we be using for the query string
#variable?  (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';

---------------
.htaccess file
---------------

Options +FollowSymLinks
RewriteEngine on
RewriteBase /

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Locked

Return to “[locked] Installation, Setup and Upgrade”