URLs - best practice?
URLs - best practice?
Hi all.
I'm new to this. More of a designer, but recently learned how to make templates for CMSMS and found it really easy.
Ok so now I'm attempting to do a site for a client, using the latest version.
I really want the urls to be as much like...
clientsite.com/section/item
...as possible... but trying to research on this site and forum, and indeed google - I just seem to get lots of people posting desperate threads on here saying they have tried to set up pretty urls on their CMSMS and it hasn't worked.
So that I can avoid making the same mistakes as others, and then pestering everyone in a panic to help me find a solution... can people please advise me the best way to achieve such url structure?
Thanks in advance for any advice
I'm new to this. More of a designer, but recently learned how to make templates for CMSMS and found it really easy.
Ok so now I'm attempting to do a site for a client, using the latest version.
I really want the urls to be as much like...
clientsite.com/section/item
...as possible... but trying to research on this site and forum, and indeed google - I just seem to get lots of people posting desperate threads on here saying they have tried to set up pretty urls on their CMSMS and it hasn't worked.
So that I can avoid making the same mistakes as others, and then pestering everyone in a panic to help me find a solution... can people please advise me the best way to achieve such url structure?
Thanks in advance for any advice
Re: URLs - best practice?
http://wiki.cmsmadesimple.org/index.php ... l_Settingsjezatron wrote: So that I can avoid making the same mistakes as others, and then pestering everyone in a panic to help me find a solution... can people please advise me the best way to achieve such url structure?
Alby
Re: URLs - best practice?
Hi thanks for the reply.
Yes I ended up trying that checklist, but like so many others I have gone through it with no joy. Bit lost as to how to get this to work now really to be honest?
Yes I ended up trying that checklist, but like so many others I have gone through it with no joy. Bit lost as to how to get this to work now really to be honest?
Re: URLs - best practice?
There is no secret, if you follow the guidelines Alby sent you.
You´ll need:
Regards
G
You´ll need:
- Linux server
- Apache with mod_rewrite (most of hosting companies)
Regards
G
Re: URLs - best practice?
yeah the worrying thing is i do have that spec for hosting, followed the instructions and no joy.
im wondering if ive mis interpreted the config / htaccess edits. i will post what i have and see if thats it.
im wondering if ive mis interpreted the config / htaccess edits. i will post what i have and see if thats it.
Re: URLs - best practice?
please tell us more... paste system information here your .htaccess on the root folder too.
Re: URLs - best practice?
Server
LINUX (Redhat Enterprise v3.0 with Apache v1.3)
'You can present friendlier, easier to remember, search engine friendly URLs to your website visitors by using mod_rewrite on our shared Linux servers.'
htaccess
Right I just got rid of the old to try again.
eg1
Will just try and do exact minimum they say in linked page... the edit at bottom
///////////////////////
# 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
#
RewriteEngine on
#
#Sub-dir e.g: /cmsms
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
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
# You can make page URLs reflect their location
# in the hierarchy by enabling the 'use_hierarchy' option:
$config['use_hierarchy'] = true;
///////////////////////
Result
When attempting to view anything on site...
"The server encountered an internal error or misconfiguration and was unable to complete your request."
LINUX (Redhat Enterprise v3.0 with Apache v1.3)
'You can present friendlier, easier to remember, search engine friendly URLs to your website visitors by using mod_rewrite on our shared Linux servers.'
htaccess
Right I just got rid of the old to try again.
eg1
Will just try and do exact minimum they say in linked page... the edit at bottom
///////////////////////
# 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
#
RewriteEngine on
#
#Sub-dir e.g: /cmsms
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
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
# You can make page URLs reflect their location
# in the hierarchy by enabling the 'use_hierarchy' option:
$config['use_hierarchy'] = true;
///////////////////////
Result
When attempting to view anything on site...
"The server encountered an internal error or misconfiguration and was unable to complete your request."
Re: URLs - best practice?
If i remove the file it works again?
Re: URLs - best practice?
Drop red text from .htaccessjezatron wrote: RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
# You can make page URLs reflect their location
# in the hierarchy by enabling the 'use_hierarchy' option:
$config['use_hierarchy'] = true;
this is in config.php
Alby
Re: URLs - best practice?
hi guys thanks you were quick hitting me back.
i took that out of .htaccess, uploaded it and it went back to the same error now 500 internal server
do you think it may be easier to take everything off, and start again? Im just trying to get this right before i bother with doing everything else on the site... save probs later.
thanks for trying to help.
i took that out of .htaccess, uploaded it and it went back to the same error now 500 internal server

do you think it may be easier to take everything off, and start again? Im just trying to get this right before i bother with doing everything else on the site... save probs later.
thanks for trying to help.
Re: URLs - best practice?
yeah i checked and they do support it. i think i will try this - i.e strip it off and start again. i was knackered the other night (hence the slightly grumpy fed up tone).
Re: URLs - best practice?
However http error 500 fire always something in http error log, look tojezatron wrote: i took that out of .htaccess, uploaded it and it went back to the same error now 500 internal server![]()
Alby
Re: URLs - best practice?
Yeah good point. in error log says this
"htdocs/.htaccess: Options not allowed here"
"htdocs/.htaccess: Options not allowed here"