Posts: 1,848
Threads: 86
Joined: Aug 2009
Should the fancyURLs have a trailing slash by default? I am thinking of changing it to do this because of all the discussion around here concerning it.
I am leaning towards 'Yes'.
On another note,
Carlos suggested a simple way to create a custom permalink structure for GS. Since every url in GS is now being generated by the find_url() function - this is finally possible. I added the functionality within the gsconfig.php file. For example:
define('GSPERMALINKS', '?id=%slug%');
or
define('GSPERMALINKS', 'subdir/%parent%/%slug%/');
if this define variable is not set, find_url() will function as it always has. Figured this would be a little custom feature that might help someone down the road. What does everyone think?
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 3,491
Threads: 106
Joined: Mar 2010
So, default GS permalink structure is the same as doing
define('GSPERMALINKS', 'index.php?id=%slug%');
New default fancy URL structure as Chris tells would be the same as:
define('GSPERMALINKS', '%parent%/%slug%/');
But if you prefer the 'classical' fancy default,
define('GSPERMALINKS', '%parent%/%slug%');
In some cases it may be interesting something like
define('GSPERMALINKS', '%slug%/');
where the parent option would be only used to create submenus, but not in the URL structure. (BTW if you move a page from one parent to another the link would remain the same.)
Chris' 2nd example could be useful when GS is installed on the home dir of a site with other subfolders, so that GS slugs cannot conflict with existing URLs, or e.g to separate contents between web apps:
define('GSPERMALINKS', 'pages/%parent%/%slug%/');
(or same without parent)
Posts: 3,491
Threads: 106
Joined: Mar 2010
About Chris' question: Personally, I prefer to add the trailing slash. BUT the default doesn't matter to me if I can easily change it.
(Most popular CMS's seem to add the trailing slash default, but I also see many big sites that don't. So I don't know if this is only a matter of aestethics, maybe speed... For SEO both seem to be equally good.)
Posts: 679
Threads: 80
Joined: Nov 2009
Just out of curiosity would it be possible to add instead of a trailing slash a custom ending such as ".me" or ".ows"?
Thanks
Posts: 3,491
Threads: 106
Joined: Mar 2010
Matthew,
You'd have to change .htaccess to add any suffix (other than "/") to the slug, as Zegnat commented here (for ".html"):
http://get-simple.info/forum/viewtopic.p...3511#p3511
All examples shown in this thread work NOW with any current GetSimple site (with mod_rewrite activated), without editing the existing .htaccess file.
Posts: 1,848
Threads: 86
Joined: Aug 2009
FYI: Last night i changed direction a little and instead added the custom permalink to the settings.php page. It didnt seem to fit in with what gsconfig.php was doing, so i moved it. Same concept - just inside the control panel instead of inside gsconfig.php
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!