Page 1 of 1

(SOLVED) how can i change links to html in CMSMS??

Posted: Sun Feb 10, 2008 7:50 am
by mercy571
hello

i need help with my cmsms

i want 2 change all links 2 (.html) by using (.htaccess)

example:

http://www.site.com/index.php?page=contact-us

to

http://www.site.com/contact-us

how can i do this??

thanks in advance...

Re: how can i change links to html in CMSMS??

Posted: Sun Feb 10, 2008 8:21 am
by cubix

Re: how can i change links to html in CMSMS??

Posted: Sun Feb 10, 2008 9:15 am
by mercy571
great  :)
thanks, cubix!

Re: how can i change links to html in CMSMS??

Posted: Sun Feb 10, 2008 9:43 am
by mercy571
hello friends
i tried all ways there

    * 1 Step 1 - .htaccess file
          o 1.1 No file extension
          o 1.2 .htm page extension
    * 2 Step 2 - config.php changes
    * 3 Step 3 - {metadata} plugin call
    * 4 LightTPD configuration


but i got this error now!
500 Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
note: m using local server :)

what should i do??

Re: how can i change links to html in CMSMS??

Posted: Sun Feb 10, 2008 6:11 pm
by nivekiam
ugh, looks like those aren't great instructions and DO NOT represent the majority of users environements.

Undo everything you've done.

Do this.  Edit config.php

First do you have mod_rewrite enabled?

If so do this:
find this line:

Code: Select all

$config['assume_mod_rewrite'] = false;
Change it to:

Code: Select all

$config['assume_mod_rewrite'] = true;
If you don't have mod_rewrite enabled then forget that part and find this line:

Code: Select all

$config['internal_pretty_urls'] = false;
Change to:

Code: Select all

$config['internal_pretty_urls'] = true;
Next, find the line that says:

Code: Select all

$config['page_extension'] = '';
change it to

Code: Select all

$config['page_extension'] = '.htm';
You'll probably want to change this too:

Code: Select all

$config['use_hierarchy'] = false;
to this:

Code: Select all

$config['use_hierarchy'] = true;
Save the file.  Now if you have mod_rewrite enabled, edit the .htaccess file and put this in there, if you don't have mod_rewrite enabled, ignore this part.

Code: Select all

# 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
save the file, done

This page might help: http://wiki.cmsmadesimple.org/index.php ... l_Settings

But IMO, it's too messy and confusing for a new user.  You do NOT need to set all of those settings.

Re: how can i change links to html in CMSMS??

Posted: Mon Feb 11, 2008 8:12 am
by mercy571
thanks nivekiam

URLs have been changed successfully, but when i click the link (for example:http://localhost/cms/extensions.htm)
i get an error:
Not Found

The requested URL /cms/extensions.htm was not found on this server.
Apache/2.2.4 (Win32) PHP/5.2.3 Server at localhost Port 80
and if i put .htaccess file in cmsms folder i cant view site and get this error:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, mercy571@hotmail.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.2.4 (Win32) PHP/5.2.3 Server at localhost Port 80
what should i do : (
thanks 2 all

Re: how can i change links to html in CMSMS??

Posted: Mon Feb 11, 2008 8:41 am
by mercy571
I found a solution in this topic:
http://forum.cmsmadesimple.org/index.ph ... 789.0.html

thanks to all : )