Page 1 of 1
Pretty URLs -- to .html or not?
Posted: Mon May 22, 2006 2:37 am
by JohnR
Hi, I think this is my first post here. [Edit: whoops! It's my second...] Let me just say that CMSMadeSimple is a lifesaver! Respect to the team that created it.
I was just wondering whether folks think that the .html suffix is better or not better. eg This:
http://www.mysite.com/somepage.html
or:
http://www.mysite.com/somepage
Which do you prefer (and why?)
(I am using 0.13, natch)
Re: Pretty URLs -- to .html or not?
Posted: Mon May 22, 2006 11:54 am
by Dj_Apx
Hello,
virtual folders (like example.com/mypage/ ) are ok, but if you're going to make it a file (without the last slash) it's much better from a user perspective to put the .html if it's html
All the best,
Dj_Apx
P.S : there are specific websites for giving examples : example.org and example.com . i am pretty much sure that mysite.com exists so no need to advertise it 
Re: Pretty URLs -- to .html or not?
Posted: Mon May 22, 2006 3:07 pm
by Russ
I'm with Dj_Apx:
'example.com/somepage.html' or (preferably) 'example.com/somepage/' but not 'example.com/somepage'
Russ
Re: Pretty URLs -- to .html or not?
Posted: Mon May 22, 2006 11:07 pm
by climberusa
if you do a mo-rewrite so your urls are
www.mysite.com/example/ don't you have issues with image links or is that fixed in the latest release?
Re: Pretty URLs -- to .html or not?
Posted: Tue May 23, 2006 1:50 am
by JohnR
Hi guys, thanks for the responses! I would certainly be happy to follow the suggestion of making it look likke directories and files, but I thought that the examples I gave were the only choices. I'll look at it again...!
Re: Pretty URLs -- to .html or not?
Posted: Tue May 23, 2006 5:40 am
by Russ
Hi climberusa, not sure what you mean, normal image paths are fine in 0.134 beta. If you mean ImageGallery, Ted was working on a fix or if you mean the popular Album - then there are fixes in the forum.
Hope this helps,
Russ
Re: Pretty URLs -- to .html or not?
Posted: Tue May 23, 2006 1:42 pm
by lemkepf
climberusa wrote:
if you do a mo-rewrite so your urls are
www.mysite.com/example/ don't you have issues with image links or is that fixed in the latest release?
You need to put the {metatag} in your template which put's a "Base" tag in your html. This basically says any "relative" image links are starting here... example:
If your at page /mycategory/nextcategory/mypage/ and your put the base tag in, your image that looks like this: images/image.gif
would really look like this: /images/image.gif (or wherever your images are)
Cool huh?

Re: Pretty URLs -- to .html or not?
Posted: Fri May 26, 2006 7:01 pm
by Caspar
Hi,
I know this forum is not for help-questions, but since we're already talking...
I installed 0.13 with clean urls and sample content and get something like:
http://www.mysite.com/index.php/home
Does anyone of you guys know how I get to:
http://www.mysite.com/home or
http://www.mysite.com/home/ ?
Or is it my configuration? In my config.php of 0.13 I left mod_rewrite = false, but I run another system on my server using the htaccess-thing, so mod_rewrite is actually on. Stupid?
Thanks so much,
Cas
P.S.: And just for the sake of asking: Has anyone tried to direct a domain to a parent-/child-page like
http://www.mysite.com/home/ ? Could that be a way to set up a multi-site system with various domains leading to different parent-/child-pages in the tree?
Getting bold now, I know...

Thanks, Cas
Re: Pretty URLs -- to .html or not?
Posted: Fri May 26, 2006 7:43 pm
by Russ
You need to set, in your config.php
$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '/';
$config['internal_pretty_urls'] = false;
$config['use_hierarchy'] = true;
And then add the following stuff to your .htaccess file. Something like:
#Config for CMS
RewriteEngine On
# 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 [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Hope this helps,
Russ
Re: Pretty URLs -- to .html or not?
Posted: Sat May 27, 2006 5:48 am
by Caspar
It does perfectly well!
Only the directing-a-domain part does not, but that's no problem for here.
Thank you, Russ. You've made a working man happy in the morning, be blessed!

Re: Pretty URLs -- to .html or not?
Posted: Sat May 27, 2006 6:29 am
by Russ
cas, glad to help and be blessed so early on a Saturday morning
Russ
Re: Pretty URLs -- to .html or not?
Posted: Sat May 27, 2006 1:33 pm
by ced64k
It doesn't work for me
I have a
500 Internal Server Error with this htaccess, however mod_rewrite is activated on my hosting. Any idea ?
Thanks

Re: Pretty URLs -- to .html or not?
Posted: Sat May 27, 2006 5:22 pm
by Russ
Sounds like either you are not allowed to do these changes (some hosts don't allow it) or that you have something else in your .htaccess making it invalid? Can you post it here?
Russ
Re: Pretty URLs -- to .html or not?
Posted: Sat May 27, 2006 5:42 pm
by ced64k