mod_rewrite ,getting the error The system cannot find the file specified.

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
relic
Forum Members
Forum Members
Posts: 34
Joined: Fri Dec 08, 2006 9:59 am

mod_rewrite ,getting the error The system cannot find the file specified.

Post by relic »

Hi all, i have searched the forum and wiki and i still cant seem to get it to work,

I am trying to use mod_rewrite (http://www.site.com/page/subpage/
But it brings back "The system cannot find the file specified."

config.php:
#------------
#URL Settings
#------------

#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'] = '/';

#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'] = false;

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

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]

===========================================

I have tried everything to try and get this to work, but it dont want to, any help would be apperciated

Cheers
Dave
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: mod_rewrite ,getting the error The system cannot find the file specified.

Post by Nullig »

Have you tried changing:

$config['use_hierarchy'] = false;

to

$config['use_hierarchy'] = true;

Nullig
User avatar
relic
Forum Members
Forum Members
Posts: 34
Joined: Fri Dec 08, 2006 9:59 am

Re: mod_rewrite ,getting the error The system cannot find the file specified.

Post by relic »

hi,

yes i have, i followed the steps shown here http://wiki.cmsmadesimple.org/index.php ... retty_URLs.

strange
alby

Re: mod_rewrite ,getting the error The system cannot find the file specified.

Post by alby »

relic wrote: hi,

yes i have, i followed the steps shown here http://wiki.cmsmadesimple.org/index.php ... retty_URLs.

strange
Check this too:
Pretty URLs and mod_rewrite
here
and here

Alby
User avatar
relic
Forum Members
Forum Members
Posts: 34
Joined: Fri Dec 08, 2006 9:59 am

Re: mod_rewrite ,getting the error The system cannot find the file specified.

Post by relic »

Hi thanks for that, but i have already read them..
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: mod_rewrite ,getting the error The system cannot find the file specified.

Post by Nullig »

Are you sure your account on the server allows you to use .htaccess files?
Can you post a link, so we can see what's happening?

Nullig
Last edited by Nullig on Sat Jun 16, 2007 4:44 pm, edited 1 time in total.
User avatar
relic
Forum Members
Forum Members
Posts: 34
Joined: Fri Dec 08, 2006 9:59 am

Re: mod_rewrite ,getting the error The system cannot find the file specified.

Post by relic »

Yes server alows this, i have just checked.

All i am getting is white page that says "The system cannot find the file specified."

Cheers
Pierre M.

Re: mod_rewrite ,getting the error The system cannot find the file specified.

Post by Pierre M. »

Hello Dave,

"the server allows", but does it work ? Here are some tests :
http://forum.cmsmadesimple.org/index.ph ... l#msg43943
1°)Does your server pass these tests ?

2°)What are your OS and webserver versions ?

3°)Please provide the source of the "white page". There may be more usefull information on it (server xyz on port n...). If you have the Firefox webdevelopper toolbar, please copy paste the result of Information -> View Response Headers.

4°)Is trailing slashes the URL scheme you really want instead of /some/pretty/url.html ?

5°)How is your site doing with pretty URLs turned off ?

Pierre M.
raul.lnx
Forum Members
Forum Members
Posts: 26
Joined: Wed Jun 28, 2006 5:55 pm

Re: mod_rewrite ,getting the error The system cannot find the file specified.

Post by raul.lnx »

Hi:

I have installed mod_rewrite in my webpage, and it seems to work very web, but now there are anothers problems.


Into config.php
------------------------------------------------------------------------------------------------------
$config['assume_mod_rewrite'] = true;
$config['internal_pretty_urls'] = false;
$config['use_hierarchy'] = true;
$config['page_extension'] = '.html';
------------------------------------------------------------------------------------------------------


into /.htaccess   

------------------------------------------------------------------------------------------------------


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]


#con extension
RewriteRule ^noticias/([0-9]*)/([0-9]*)/(.+).html$ index.php?mact=News,cntnt01,detail,0&cntnt01articleid=$1&cntnt01returnid=$2 [NC,L]
RewriteRule ^(.+).html$ index.php?page=$1 [QSA]


------------------------------------------------------------------------------------------------------

PROBLEMS DETECTED:

I have 2 personal errordocument into my root path:
/notfound.html  and /forbidden.html and they are called by my .htaccess :


#
ErrorDocument 404 /notfound.html ( this "solved" non-elegant solution writting the html code into admin->config general )
ErrorDocument 403 /forbidden.html


For example, if I write in web-browser : htttp://www.snowboard-zamora.net/fake.html , it must be redirect to /notfound.html , but the server shows “not found” because ... ( i think it is trying to open /index.php?=fake.html )

How can I solve this error ???


OTHER PROBLEM , THE BIG PROBLEM !!!!!!!

Since i’have installed mod_rewrite, i can’t edit, create NEWS ..... Into iframes in admin pannel shows “not found” .......

If I disabled FCKEditorX, i can edit news, with html code, but if I enable it, appears "not found" .....

Anyone knows to solve this problems ??

My webpage is : www.snowboard-zamora.net


THANKS
Last edited by raul.lnx on Wed Jun 27, 2007 10:59 am, edited 1 time in total.
Pierre M.

Re: mod_rewrite ,getting the error The system cannot find the file specified.

Post by Pierre M. »

raul.lnx wrote: I have 2 personal errordocument into my root path:
/notfound.html  and /forbidden.html and they are called by my .htaccess :

ErrorDocument 404 /notfound.html ( this "solved" non-elegant solution writting the html code into admin->config general )
ErrorDocument 403 /forbidden.html

For example, if I write in web-browser : htttp://www.snowboard-zamora.net/fake.html , it must be redirect to /notfound.html , but the server shows �not found� because ... ( i think it is trying to open /index.php?=fake.html )

How can I solve this error ???
Hello,

I think you are right, mod_rewrite rewrites /fake.html to /index.php?page=fake (or.html)
You may like the CMSms builtin 404 error handling. It is in Site Admin -> Global settings in the admin. Just copy the HTML code of your existing notfound.html page in the textbox and activate the checkbox.

Pierre M.
raul.lnx
Forum Members
Forum Members
Posts: 26
Joined: Wed Jun 28, 2006 5:55 pm

Re: mod_rewrite ,getting the error The system cannot find the file specified.

Post by raul.lnx »

Ok. That error I solved last day ...... but the man problem is the FCKEditorX. With mod_rewrite/pretty_urls actuvated, i can't edit news and pages ..... It shows "not found" ???into the iframe of FCKEditor?? ..... ( The toolbar not appers, only a iframe below ) .....


WOWWWW, it's solved with this lines into .htaccess !!!!!

-----------------------------------------------------------------------------------

Options +FollowSymLinks
RewriteEngine off

-----------------------------------------------------------------------------------
Last edited by raul.lnx on Fri Jun 29, 2007 6:23 pm, edited 1 time in total.
Post Reply

Return to “CMSMS Core”