Pretty URLs -- to .html or not?
Pretty URLs -- to .html or not?
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)
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)
Last edited by JohnR on Mon May 22, 2006 2:39 am, edited 1 time in total.
Re: Pretty URLs -- to .html or not?
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
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?
I'm with Dj_Apx:
'example.com/somepage.html' or (preferably) 'example.com/somepage/' but not 'example.com/somepage'
Russ
'example.com/somepage.html' or (preferably) 'example.com/somepage/' but not 'example.com/somepage'
Russ
-
- Forum Members
- Posts: 126
- Joined: Sun Feb 26, 2006 7:10 pm
Re: Pretty URLs -- to .html or not?
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?
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?
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
Hope this helps,
Russ
Re: Pretty URLs -- to .html or not?
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: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?
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?
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
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?
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
$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?
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!
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?
cas, glad to help and be blessed so early on a Saturday morning
Russ
Russ
Re: Pretty URLs -- to .html or not?
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
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?
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
Russ