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: 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...
You can use directly that code (but comment/drop row:  Options -Indexes)
Or cut the code in two parts:
- first end a row before of RewriteEngine On and add (always comment/drop row:  Options -Indexes) to your .htaccess BEFORE

- second (mod_rewrite code) substitute your code in


Alby
Pierre M.

Re: URLs - best practice?

Post by Pierre M. »

Hello,

as this thread is originaly asking for "best practice" about URLs and its author wanting "pretty URLs" to play nice inside the web I feel a need to post some of my opinion about this.

The poster wants /some/hierarchy/url (same as /some/hierarchy/url.html which I prefer, tuning the "page extension").

As can be seen in the forum by searching my posts about "trailing slashes" I still don't understand why some add those lines in their .htaccess to turn their URLs pretty :

Code: Select all

# 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]
I wouldn't mind being proven wrong but I think these lines are useless. How are trailing slashes pretty ?
The shorter, the simpler, the better .htaccess.

Pierre M.
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: 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...
You can use directly that code (but comment/drop row:  Options -Indexes)
Or cut the code in two parts:
- first end a row before of RewriteEngine On and add (always comment/drop row:  Options -Indexes) to your .htaccess BEFORE

- second (mod_rewrite code) substitute your code in


Alby
Hey guys sorry Im still confused on this issue.

Should i be replacing my current .htaccess file with the linked passage
http://wiki.cmsmadesimple.org/index.php ... l_Settings
under "URL Filtering Using .htaccess"

or should the passage on the linked page be combined with what is already in my .htaccess?
Pierre M.

Re: URLs - best practice?

Post by Pierre M. »

I've not reread all the thread (hence may be confused myself) but have you tried the provided /doc/.htaccess sample ?
After you've got some rewriting working you can refine it and and filtering and tune etc.

Pierre M.
viebig

Re: URLs - best practice?

Post by viebig »

Pierre M. wrote: I've not reread all the thread (hence may be confused myself) but have you tried the provided /doc/.htaccess sample ?
After you've got some rewriting working you can refine it and and filtering and tune etc.

Pierre M.
wouldnt it be /doc/htaccess.txt ?  :)
jezatron
Forum Members
Forum Members
Posts: 63
Joined: Sun May 17, 2009 3:02 pm

Re: URLs - best practice?

Post by jezatron »

Pierre M. wrote: I've not reread all the thread (hence may be confused myself) but have you tried the provided /doc/.htaccess sample ?
After you've got some rewriting working you can refine it and and filtering and tune etc.

Pierre M.
hey. yes i used the sample from that location. got the clean urls working then saw the extra bit about filtering... but wasn't sure at all from instructions how to implement it... i.e. where i put it in the .htaccess etc.....
jezatron
Forum Members
Forum Members
Posts: 63
Joined: Sun May 17, 2009 3:02 pm

Re: URLs - best practice?

Post by jezatron »

ps - really sorry if its annoying im a total tard when it comes to this stuff still as i am a graphics and css man.
Pierre M.

Re: URLs - best practice?

Post by Pierre M. »

Hello again,

so, you have set up CMSms and activated pretty URLs using the provided .htaccess sample (packaged as htaccess.txt) and all worked fine out of the box. Nice :-)

Now, you want to add URL filtering :
-filtering rules come first (hence before rewriting rules).
-add them one at a time, test each time (may be with rewritelog).

[solved] ?

Pierre M.
jezatron
Forum Members
Forum Members
Posts: 63
Joined: Sun May 17, 2009 3:02 pm

Re: URLs - best practice?

Post by jezatron »

ok pierre i will check this out thanks for posting
viebig

Re: URLs - best practice?

Post by viebig »

This topic keeps coming... I can stand it anymore!  :)

I´ll fix it for free and explain every single line to you if you want. I believe this topic can confuse more than help other people at this point.

PM me, add me, and I´ll  do it.

Regards

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

Re: URLs - best practice?

Post by jezatron »

viebig wrote: This topic keeps coming... I can stand it anymore!   :)

I´ll fix it for free and explain every single line to you if you want. I believe this topic can confuse more than help other people at this point.

PM me, add me, and I´ll  do it.

Regards

G

sorry guys, you sound annoyed viebig - i dont mean to be a pain in the ......  :-[

i was attracted to CMS made simple because you have a lot of freedom as a designer, but im finding the process of getting it all up and running very very far from simple. It just seems to be one thing after another. I have another thread in this forum about how the gallery call is working in templates but not when called in content, which unless i can fix, renders the site I am building useless. i know it probably is annoying for you guys that know what you are doing with CMSMS to keep having these basic issues, but its really baffling and stressful at the moment trying to get this to work also... which i kind of didn't expect so much from a CMS called 'simple'. The other experience I have with CMS is designing for Drupal sites.
viebig

Re: URLs - best practice?

Post by viebig »

jezatron... I must say that you are wrong.

Setup pretty urls is simple for most of the people. Also.. cmsms is CMS Made Simple, not because anyone can get up a site easily. CMS requires a minimal understanding of filesystems, databases, php, and a web server.

I didnt try to judge you and your problem. But if you´re having problems on reading the steps to get that done, must be because you need to understand another basic things first, things that comes before any content management system. The steps to get pretty urls working are really simple, and probably if you not getting it is because you´re doing something wrong.

But, dont give up. Cmsms is great for designers, you just need to learn a few things about web systems, web servers and programming. That knowledge will help you in any kind of web project.

About the Gallery, what it does? Never used this module. Did you check if this module is well mantained? The last update?

Regards

G
Post Reply

Return to “CMSMS Core”