mod_rewrite problem
-
miss_d_bus
- Forum Members

- Posts: 121
- Joined: Sun May 01, 2005 4:27 pm
mod_rewrite problem
using the mod_rewrite, my files are now .php but I cant access the admin area any more. I get this error:
Warning: Smarty error: unable to read resource: "db:admin/index" in /usr/local/psa/home/vhosts/kentradiohire.co.uk/httpdocs/TEST/lib/smarty/Smarty.class.php on line 1088
Any ideas what might be wrong?
Thanks.
Warning: Smarty error: unable to read resource: "db:admin/index" in /usr/local/psa/home/vhosts/kentradiohire.co.uk/httpdocs/TEST/lib/smarty/Smarty.class.php on line 1088
Any ideas what might be wrong?
Thanks.
Re: mod_rewrite problem
Could you post your mod_rewrite rules, so we can see exactly what's being rewritten?
Many modules available from the http://dev.cmsmadesimple.org
The CMS Made Simple Developer Cookbook is now available from Packt Publishers!
The CMS Made Simple Developer Cookbook is now available from Packt Publishers!
-
miss_d_bus
- Forum Members

- Posts: 121
- Joined: Sun May 01, 2005 4:27 pm
Re: mod_rewrite problem
Here it is for the .htaccess:
For the config.php file:
I think thats all of it.
Thanks.
Code: Select all
php_flag magic_quotes_gpc Off
php_flag register_globals Off
php_flag session.use_trans_sid Off
# Make sure you have Options FollowSymLinks
# and Allow on
RewriteEngine On
#Rewrites page.shtml as index.php?page
RewriteCond % !-f [NC]
RewriteRule ^(.+)\.php$ index.php?page=$1 [QSA]Code: Select all
$config['page_extension'] = '.php';Thanks.
Re: mod_rewrite problem
Ah, OK. I understand what's going on. When you try to get into the admin, it's still doing the rewriting. The solution is to put another .htaccess file in your admin directory. That .htaccess file should look like:
That should make it work.
Good luck!
___Samuel___
Code: Select all
RewriteEngine Off
Good luck!
___Samuel___
Many modules available from the http://dev.cmsmadesimple.org
The CMS Made Simple Developer Cookbook is now available from Packt Publishers!
The CMS Made Simple Developer Cookbook is now available from Packt Publishers!
-
miss_d_bus
- Forum Members

- Posts: 121
- Joined: Sun May 01, 2005 4:27 pm
Re: mod_rewrite problem
Thank you!
yes that worked perfectly
Now CMSMS will do exactly what I need
yes that worked perfectly
Now CMSMS will do exactly what I need
-
miss_d_bus
- Forum Members

- Posts: 121
- Joined: Sun May 01, 2005 4:27 pm
Re: mod_rewrite problem
Does this work any more ?
I cannot get it to work with the current version of this cms.
thanks,
Catherine
I cannot get it to work with the current version of this cms.
thanks,
Catherine
-
Pierre M.
Re: mod_rewrite problem
What are you talking about ?
Front end URL rewriting OR back end URL not rewriting ?
Both are quite independant of the version of CMSms. You should not have any trouble.
Please describe your problem : CMSms version, URL rewriting options, config parameters...
PM
Front end URL rewriting OR back end URL not rewriting ?
Both are quite independant of the version of CMSms. You should not have any trouble.
Please describe your problem : CMSms version, URL rewriting options, config parameters...
PM
-
miss_d_bus
- Forum Members

- Posts: 121
- Joined: Sun May 01, 2005 4:27 pm
Re: mod_rewrite problem
i have an existing website where the files are filename.php as the files are static.
I am converting the website over to the cms and want to retain the same file names so it is front end url rewriting i am after.
I am using the latest version of cms under apache and linux.
Since the config.php file no longer contains the parameter:
$config['page_extension'] = '.php';
I wondered if it was obsolete, and if so, what would i do to achieve what i require?
Thanks,
Catherine
I am converting the website over to the cms and want to retain the same file names so it is front end url rewriting i am after.
I am using the latest version of cms under apache and linux.
Since the config.php file no longer contains the parameter:
$config['page_extension'] = '.php';
I wondered if it was obsolete, and if so, what would i do to achieve what i require?
Thanks,
Catherine
-
Pierre M.
Re: mod_rewrite problem
I don't think the page extension is obsolete. May be your new installation has a problem with its config.php. I think you should erase all cmsms.php and reinstall 1.0.2 from scratch. Or may be the php handler catches the request before the rewrite ?
According to http://wiki.cmsmadesimple.org/index.php ... l_Settings , once you have set up your .htaccess, you can achieve what you do with :
$config['assume_mod_rewrite'] = true;
$config['internal_pretty_urls'] = falsee;
$config['page_extension'] = '.php'; (your trick)
$config['use_hierarchy'] = true; (as you wish, this is my favorite)
I'm sure it is possible to make the ".php site" you describe by properly configuring the php handler, the rewrite and cmsms config. But I would not recommend that. I understand you want to keep your URLs, but may I suggest another (may be simpler) way to do it :
-build the new website with a nice long term URL scheme. I mean ".html" or ".xhtml" extensions.
-use the webserver mod_rewrite to send 301 (permanently moved) responses for any request to your existing ".php" URLs, redirecting properly search engines and users from /path/to/existing/page.php to /path/to/existing/page.html
PM
According to http://wiki.cmsmadesimple.org/index.php ... l_Settings , once you have set up your .htaccess, you can achieve what you do with :
$config['assume_mod_rewrite'] = true;
$config['internal_pretty_urls'] = falsee;
$config['page_extension'] = '.php'; (your trick)
$config['use_hierarchy'] = true; (as you wish, this is my favorite)
I'm sure it is possible to make the ".php site" you describe by properly configuring the php handler, the rewrite and cmsms config. But I would not recommend that. I understand you want to keep your URLs, but may I suggest another (may be simpler) way to do it :
-build the new website with a nice long term URL scheme. I mean ".html" or ".xhtml" extensions.
-use the webserver mod_rewrite to send 301 (permanently moved) responses for any request to your existing ".php" URLs, redirecting properly search engines and users from /path/to/existing/page.php to /path/to/existing/page.html
PM
-
miss_d_bus
- Forum Members

- Posts: 121
- Joined: Sun May 01, 2005 4:27 pm
Re: mod_rewrite problem
Thanks for that.
I think i got the config settings a bit wrong.
I'll try it when i get back to work
Thanks
I think i got the config settings a bit wrong.
I'll try it when i get back to work
Thanks
