Posts: 1,204
Threads: 30
Joined: Jun 2010
Polyfragmented reminded me about a bug, which I wanted to mention.
Every slug gets a trailing slash in menu.
It sometimes doesn't show up at the end of url in browser's url strip, but that happends rarely.
Any ideas how to get rid of this weird problem ?
Addons: blue business theme, Online Visitors, Notepad
Posts: 1,848
Threads: 86
Joined: Aug 2009
it is added if you use the function find_url() to get the url... all paths using fancy urls get the trailing slash. But of course, if you just type in the URL (either into the browsers address bar, or your template, or your page's body) then it won't have that trailing slash.
If you are using the header template tag within your theme, you should see that the canonical url always has the trailing slash.
-
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
Until 2.01 the default fancy url structure was: parent/slug
In 2.03 it was changed to: parent/slug/
though you can remove the slash: settings -> custom permalink -> %parent%/%slug%
If you have mixed style links in your site, you might be using some plugin that generates old style links (not using find_url() function)
Posts: 1,204
Threads: 30
Joined: Jun 2010
Ohhh thx gentlemen for explanations.
It was so simple (%parent%/%slug%), but as always didn't think about trying it out.
Instead I wanted to dig into the code :|
What was the reason of adding a trailing slash by default ?
There was a discussion about rewriting links, pages recognized as directories, abut actually I have no idea about the main reason.
Addons: blue business theme, Online Visitors, Notepad
Posts: 7
Threads: 1
Joined: Jan 2011
Posts: 1
Threads: 0
Joined: May 2011
I'm a newby here can someone please explain to me what is the significance of adding a trailing slash?
Posts: 2,928
Threads: 195
Joined: Feb 2011
bowyia Wrote:I'm a newby here can someone please explain to me what is the significance of adding a trailing slash?
a trailing slash "gives the impression" of a directory not a file
one of the reasons for this could be that it is positive for SEO
Posts: 1
Threads: 0
Joined: May 2011
2011-05-04, 02:48:13
(This post was last modified: 2011-05-04, 02:49:21 by teragoldf.)
You are right Connie...the search engine robots look at an ending backslash as meaning a directory and give it a higher ranking which in turn helps you get further up the ladder on that climb to the first page of search engines.
Posts: 1,204
Threads: 30
Joined: Jun 2010
I've been digging for some information about this matter, and seems that trailing slash may be SEO positive option. But duplicated content, as it is now in GS, works exactly opposite thing.
I forced the pages to have trailing slash in menu, but if I write the url manually without trailing slash, the page isn't automatically redirected to URL with trailing slash.
Seems that some rewrite rules will have to be added/changed to redirect pages without trailing slash using a 301 redirect.
But I ask firstly if it can be achieved somehow without messing with htaccess ?
Addons: blue business theme, Online Visitors, Notepad
Posts: 524
Threads: 48
Joined: Mar 2011
Activate canonical URLs in gsconfig, those have the trailing slash.
Posts: 1,204
Threads: 30
Joined: Jun 2010
2011-05-10, 08:12:47
(This post was last modified: 2011-05-10, 08:14:37 by BlackRose.)
polyfragmented Wrote:Activate canonical URLs in gsconfig, those have the trailing slash.
I am still amazed with GS simplicity
Addons: blue business theme, Online Visitors, Notepad
Posts: 1
Threads: 0
Joined: May 2011
ccagle8 Wrote:it is added if you use the function find_url() to get the url... all paths using fancy urls get the trailing slash. But of course, if you just type in the URL (either into the browsers address bar, or your template, or your page's body) then it won't have that trailing slash.
If you are using the header template tag within your theme, you should see that the canonical url always has the trailing slash.
thanks for this helpful info!