Mod_rewrite 404 error

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
omniat
Forum Members
Forum Members
Posts: 15
Joined: Sun Feb 17, 2008 2:34 am

Mod_rewrite 404 error

Post by omniat »

Hi All,

Just started out in CMSMS and love it so far. Used may systems in the past and find this easy and not over the top with unwanted functionality.

Now to my issue.

This is possibly simple but i spent the best part of a day and still cant get it working.

I enabled mod rewrite in the congfig file to true.

when i navigate to off the main page i get a 404 error

"Not Found

The requested URL /testing was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

The url is being written http:mysite/test-url but the page cant be found.

Cheers
nivekiam

Re: Mod_rewrite 404 error

Post by nivekiam »

Did you add the neccessary rewrite rules to .htaccess?
# BEGIN CMSMS and Rewrite Rules
# Make sure you have Options FollowSymLinks
# and Allow on

RewriteEngine On

# Might be needed in a subdirectory
#RewriteBase /

# CMSMS Rewriting
# Set assume mod_rewrite to true in config.php and clear CMSMS cache
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
# END CMSMS
Optionally you can also add some additional URL filtering for added security, see this page for more info:
http://wiki.cmsmadesimple.org/index.php ... l_Settings
vomaringo
Forum Members
Forum Members
Posts: 11
Joined: Thu Dec 20, 2007 5:40 pm

Re: Mod_rewrite 404 error

Post by vomaringo »

check that httpd.conf get AllowOverride All for the cms directory to enable the rewriting rules.
Post Reply

Return to “CMSMS Core”