Page 1 of 1

Modrewrite Issue (1.6.1)

Posted: Sat Jul 25, 2009 9:31 am
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!

Re: Modrewrite Issue (1.6.1)

Posted: Sat Jul 25, 2009 3:41 pm
by Dr.CSS
It would help if you said what the problem is...

Re: Modrewrite Issue (1.6.1)

Posted: Sat Jul 25, 2009 4:02 pm
by slicencode
As per the above, I'm getting 404's, do you need more information? Cheers

Re: Modrewrite Issue (1.6.1)

Posted: Sat Jul 25, 2009 4:06 pm
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?...

Re: Modrewrite Issue (1.6.1)

Posted: Sat Jul 25, 2009 4:29 pm
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)?

Re: Modrewrite Issue (1.6.1)

Posted: Sat Jul 25, 2009 5:09 pm
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...

Re: Modrewrite Issue (1.6.1)

Posted: Sat Jul 25, 2009 5:27 pm
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

Re: Modrewrite Issue (1.6.1)

Posted: Sat Jul 25, 2009 8:45 pm
by Dr.CSS
Now for the question that should have come earlier...

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