Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trailing slash on FancyURLs - default value
#1
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!
Reply
#2
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)
Reply
#3
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.)
Reply
#4
Just out of curiosity would it be possible to add instead of a trailing slash a custom ending such as ".me" or ".ows"?

Thanks
JWH Technologies
Have any marketing ideas for Get-Simple? Let me hear them!
Reply
#5
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.
Reply
#6
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!
Reply




Users browsing this thread: 1 Guest(s)