URLs - best practice?

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.
alby

Re: URLs - best practice?

Post by alby »

jezatron wrote: "htdocs/.htaccess: Options not allowed here"
Try to drop:
Options +FollowSymLinks

Alby
jezatron
Forum Members
Forum Members
Posts: 63
Joined: Sun May 17, 2009 3:02 pm

Re: URLs - best practice?

Post by jezatron »

alby wrote:
jezatron wrote: "htdocs/.htaccess: Options not allowed here"
Try to drop:
Options +FollowSymLinks

Alby
lol

i have no idea what you just said. sorry.



I have wiped the cmsms off the server.

Deleted old mysql database.

created new mysql database

put the cms back on.

just gotta do the install stuff again and then will have a second crack at this mod rewrite stuff.
jezatron
Forum Members
Forum Members
Posts: 63
Joined: Sun May 17, 2009 3:02 pm

Re: URLs - best practice?

Post by jezatron »

ok right... cmsms is now re-installed.


referring back to the instructions all i should have to do to get the urls to work properly is...

add the following lines to my config.php file...
$config['internal_pretty_urls'] = false;
$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '';
$config['use_hierarchy'] = true;


PS - it doesnt actually state where abouts within the config file to place these lines... should they be at the end?

.htaccess file
create .htaccess file by copying htaccess.text from /doc/ and pasting to root, renaming '.htaccess'
change permissions of file to 644.
Last edited by jezatron on Sun Jun 21, 2009 7:14 pm, edited 1 time in total.
alby

Re: URLs - best practice?

Post by alby »

jezatron wrote:
alby wrote: Try to drop:
Options +FollowSymLinks

i have no idea what you just said. sorry.
Was this:
jezatron wrote: ........................
#Options -Indexes
#ServerSignature Off
#
Options +FollowSymLinks
#

RewriteEngine on
#
#Sub-dir e.g: /cmsms
........................
Alby
jezatron
Forum Members
Forum Members
Posts: 63
Joined: Sun May 17, 2009 3:02 pm

Re: URLs - best practice?

Post by jezatron »

I realised with the root/config.php file it was editing lines already in there for mod rewrite, hierachy etc etc.

I have to admit I'm still finding these instructions incredbily confusing. I will try and help making them more accessible to newbs after if i can.


there is a note on the walkthrough....
If you change anything in config.php, remember to clear the cache afterwards.
Cache in browser or cache somewhere else?


Also with regards to the filtering section that is suggested to be added to .htaccess.... do i add it after whats already in .htaccess or paste over what is in there?
jezatron
Forum Members
Forum Members
Posts: 63
Joined: Sun May 17, 2009 3:02 pm

Re: URLs - best practice?

Post by jezatron »

oh right Alby I see what you mean now.

i wiped the server and started again in the end anyway. do you think i will need to remove that section this time round?
jezatron
Forum Members
Forum Members
Posts: 63
Joined: Sun May 17, 2009 3:02 pm

Re: URLs - best practice?

Post by jezatron »

i searched for what files needed to be cleared to clear the cache and subsequently deleted files in /tmp/cache and /tmp/templates_c
i still have 500 error at the moment though
alby

Re: URLs - best practice?

Post by alby »

jezatron wrote: i searched for what files needed to be cleared to clear the cache and subsequently deleted files in /tmp/cache and /tmp/templates_c
i still have 500 error at the moment though
500 fire always a message in error log

Alby
jezatron
Forum Members
Forum Members
Posts: 63
Joined: Sun May 17, 2009 3:02 pm

Re: URLs - best practice?

Post by jezatron »

right i have then deleted the line that you suggested alba and voila!!!!! i think its working.

i have also now cleared the cache again also

still working. jeez i was getting worried then.

thanks for all help. if i can ever help on design / css lemme know

***
Can I suggest a few things to the linked documentation at
http://wiki.cmsmadesimple.org/index.php ... l_Settings
to make it a bit less confusing?
***



I still just need to resolve this....

also with regards to the bit about filtering using the htaccess....

my htaccess currently looks like this....


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

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]







Am I right to assume that I add the filtering portion the bottom of this file after the ?
Last edited by jezatron on Sun Jun 21, 2009 8:16 pm, edited 1 time in total.
alby

Re: URLs - best practice?

Post by alby »

jezatron wrote: thanks for all help. if i can ever help on design / css lemme know
jquery  ::)  :)

jezatron wrote: Can I suggest a few things to the linked documentation at
http://wiki.cmsmadesimple.org/index.php ... l_Settings
to make it a bit less confusing?
Wiki is collaborative, login and edit  ;)

Alby
jezatron
Forum Members
Forum Members
Posts: 63
Joined: Sun May 17, 2009 3:02 pm

Re: URLs - best practice?

Post by jezatron »

alby wrote:
jezatron wrote: thanks for all help. if i can ever help on design / css lemme know
jquery  ::)  :)

haha you having troubles with jquery? my mate who is a developer tried to get me into it... im not sure my little arty brain is designed for such things, haha. i learned a little... are you stuck on anything specific?

im good with css and graphical stuff though :)

alby wrote:
jezatron wrote: Can I suggest a few things to the linked documentation at
http://wiki.cmsmadesimple.org/index.php ... l_Settings
to make it a bit less confusing?
Wiki is collaborative, login and edit  ;)

Alby
oh cool yeah - duh@ me.
Last edited by jezatron on Sun Jun 21, 2009 9:19 pm, edited 1 time in total.
jezatron
Forum Members
Forum Members
Posts: 63
Joined: Sun May 17, 2009 3:02 pm

Re: URLs - best practice?

Post by jezatron »

ok what i will do is work out how to make the instructions on the wiki flow a bit better, update them.... and then post a link in this thread and change to solved.
jezatron
Forum Members
Forum Members
Posts: 63
Joined: Sun May 17, 2009 3:02 pm

Re: URLs - best practice?

Post by jezatron »

PS Alby - I still just need to work out this bit... have you got any idea?

jezatron wrote:
I still just need to resolve this....

also with regards to the bit about filtering using the htaccess....

my htaccess currently looks like this....


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

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]







Am I right to assume that I add the filtering portion the bottom of this file after the ?

alby

Re: URLs - best practice?

Post by alby »

jezatron wrote: Am I right to assume that I add the filtering portion the bottom of this file after the ?
What filtering?
If relative to mod_rewrite must be "in"

Alby
jezatron
Forum Members
Forum Members
Posts: 63
Joined: Sun May 17, 2009 3:02 pm

Re: URLs - best practice?

Post by jezatron »

yeah im referring to the bit on this page

http://wiki.cmsmadesimple.org/index.php ... l_Settings

under
'URL Filtering Using .htaccess '

it gives a long passage of code to add to my root/.htaccess

im not sure where to add this code...

my htaccess looks like this...

[quote="jezatron"]
# 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
#
#

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]



First I tried adding the quoted filtering passage right at the end of the .htaccess after and I got a 500 error.

i restored my htaccess to what it was previously and the site worked again.

i then tried adding the quoted filtering passage just inside the and got a 500 error again lol

born to code me lol
Post Reply

Return to “CMSMS Core”