[solved] mod_rewrite not working, htaccess and config.php here

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
zeroality
Forum Members
Forum Members
Posts: 64
Joined: Mon Aug 14, 2006 10:41 am

[solved] mod_rewrite not working, htaccess and config.php here

Post by zeroality »

I'm not sure if this belongs here or in developer discussion so if I have erred, can someone move this for me? Thanks.

The install in question is http://www.pokemontopaz.net/repository/ which is separate from the CMSMS install set up on the root server. The root server works great - as you can see at http://www.pokemontopaz.net/art/ but this install doesn't.

http://www.pokemontopaz.net/repository/editor/ doesn't work but http://www.pokemontopaz.net/repository/ ... age=editor does. I have set up pretty urls as instructed and it is actually the exact same as what I have in the root install.

config.php pertaining code

Code: Select all

#------------
#URL Settings
#------------

#What type of URL rewriting should we be using for pretty URLs?  Valid options are:
#'none', 'internal', and 'mod_rewrite'.  'internal' will not work with IIS some CGI
#configurations. 'mod_rewrite' requires proper apache configuration, a valid
#.htaccess file and most likely {metadata} in your page templates.  For more
#information, see:
#http://wiki.cmsmadesimple.org/index.php/FAQ/Installation/Pretty_URLs#Pretty_URL.27s
$config['url_rewriting'] = 'mod_rewrite'; // this is new from 1.6

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

#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; // this will be the standard from 1.7

#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 (that's all i have in it)

Code: Select all

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]
Both are in the /repository/ directory.
Last edited by zeroality on Mon Mar 29, 2010 12:34 am, edited 1 time in total.
replytomk3

Re: mod_rewrite not working, htaccess and config.php here

Post by replytomk3 »

RewriteBase /

Change this to
RewriteBase /yourdirectory/
User avatar
zeroality
Forum Members
Forum Members
Posts: 64
Joined: Mon Aug 14, 2006 10:41 am

Re: mod_rewrite not working, htaccess and config.php here

Post by zeroality »

That did the trick. Thanks!
Post Reply

Return to “CMSMS Core”