Modrewrite Issue (1.6.1)

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
slicencode
Forum Members
Forum Members
Posts: 17
Joined: Sat Jul 25, 2009 7:27 am

Modrewrite Issue (1.6.1)

Post by slicencode »

I didn't have a problem with this before, but now it's not working anymore (i.e. I'm getting 404's):
RewriteEngine on
#
#Sub-dir e.g: /cmsms/
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
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
And here the config:
#------------
#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 ... ty_URL.27s
$config['url_rewriting'] = 'mod_rewrite';

#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;

#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';
Anybody have an idea to this effect?

Thank you!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Modrewrite Issue (1.6.1)

Post by Dr.CSS »

It would help if you said what the problem is...
slicencode
Forum Members
Forum Members
Posts: 17
Joined: Sat Jul 25, 2009 7:27 am

Re: Modrewrite Issue (1.6.1)

Post by slicencode »

As per the above, I'm getting 404's, do you need more information? Cheers
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Modrewrite Issue (1.6.1)

Post by Dr.CSS »

Do you have more than one htaccess in you root?...

Any reason your not using the newest htaccess from the root/doc folder?...
slicencode
Forum Members
Forum Members
Posts: 17
Joined: Sat Jul 25, 2009 7:27 am

Re: Modrewrite Issue (1.6.1)

Post by slicencode »

Thanks for the reply, I'm only using one htaccess (just checked again), is there a new rewrite code (not sure if I understood the 2nd question)?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Modrewrite Issue (1.6.1)

Post by Dr.CSS »

Look in the root of your site or in the unpacked cmsms on your computer and you will see a folder called doc in it you will find a different htaccess file than the one you pasted...
mel
Forum Members
Forum Members
Posts: 147
Joined: Mon Dec 11, 2006 11:53 pm

Re: Modrewrite Issue (1.6.1)

Post by mel »

slicencode wrote: I didn't have a problem with this before, but now it's not working anymore (i.e. I'm getting 404's):
Hi slicencode,
I think I have the same problem than you. I also just discover that it have a new htaccess in doc folder as pointed by Dr CSS. But I try both, and it doesn't help to solve problem. I'm now getting 500 errors. I dont have time to get more in depth now, but if someones have ideas...
Thanks
Mel
Version 1.6-MLE
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Modrewrite Issue (1.6.1)

Post by Dr.CSS »

Now for the question that should have come earlier...

What does your system info page say, any yellow ! or red X?...
Post Reply

Return to “CMSMS Core”