[solve] pretty URL, how?

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
User avatar
tern
Forum Members
Forum Members
Posts: 65
Joined: Tue Oct 16, 2007 1:00 pm

[solve] pretty URL, how?

Post by tern »

i follow: http://wiki.cmsmadesimple.org/index.php/User_Handbook/Installation/Optional_Settings
but still dont get it.

i change all the settings in config
& i delete the old .htaccess, then rename the htaccess.txt to .htaccess

the url is working, but the page is:

Not Found

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

Apache/1.3.33 Server at www.boxkator.net Port 80

am i missing something?

pls help me.
Last edited by tern on Sat Nov 14, 2009 9:01 am, edited 1 time in total.
thank you cms made simple. cms made possible:
www.redstarz.net
viebig

Re: pretty URL, how?

Post by viebig »

check if you server supports mod_rewrite

check if .htaccess is located in cmsms root folder (not docs)

if your cmsms install in on a subfolder, change the RewriteBase directive in htaccess to your cmsms relative path
User avatar
tern
Forum Members
Forum Members
Posts: 65
Joined: Tue Oct 16, 2007 1:00 pm

Re: pretty URL, how?

Post by tern »

viebig wrote: check if you server supports mod_rewrite

check if .htaccess is located in cmsms root folder (not docs)

if your cmsms install in on a subfolder, change the RewriteBase directive in htaccess to your cmsms relative path
Thanks. now i got a better & clearer information.

I'm hosting at godaddy, & i have email them, they said yes.
& i have move my .htaccess to cmsms root folder.
yes my cmsms install in a subfolder, i hv change the RewriteBase to:
#Sub-dir e.g: /cmsms
RewriteBase /-boxkator (my folder name it is "-boxkator")

Code: Select all

# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"

#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off

# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off
#
Options +FollowSymLinks
#
<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /-boxkator/

#
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteCond %{REQUEST_METHOD} !POST$
#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]
</IfModule>

but now i got a new error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, support@supportwebsite.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/1.3.33 Server at www.boxkator.net Port 80
Last edited by tern on Sat Nov 14, 2009 4:32 am, edited 1 time in total.
thank you cms made simple. cms made possible:
www.redstarz.net
replytomk3

Re: pretty URL, how?

Post by replytomk3 »

make sure the "RewriteBase /" line is modified to the correct directory. if cmsms is in /cms, then the line must say
RewriteBase /cms (or /cms/ I don't remember)

.htaccess must be in the server root directory, and not cmsms directory (if I am wrong, other people can yell at me)

you can also try internal pretty urls if you give up (people can yell at me again).
User avatar
tern
Forum Members
Forum Members
Posts: 65
Joined: Tue Oct 16, 2007 1:00 pm

Re: pretty URL, how?

Post by tern »

Amazing!

i replace with this (no path needed):

Code: Select all

Options +FollowSymLinks
RewriteEngine on

# RewriteCond %{REQUEST_URI} !/$
# RewriteCond %{REQUEST_URI} !/.
# RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ /index.php?page=$1 [QSA]

# RewriteRule ^index.php$ / [r=301,l]
# RewriteRule ^page/(.+)$ /index.php?page=$1
place this code & done!
thank you cms made simple. cms made possible:
www.redstarz.net
Locked

Return to “[locked] Installation, Setup and Upgrade”