Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted April 2, 201014 yr I suggest allowing for the following format, when it comes to editing furlTemplate.php: www.example.com/topicdirectory(topicnumber)/topic-name/ or... www.example.com/topicdirectory/topicnumber/topic-name/ As of now, furlTemplate does not allow us to remove the dash in friendly urls which precedes the topic name. Please see my topic about this here. I personally find that a friendly URL looks much better when the topic number does not separate the topic name with a dash. My desired format would look like this: www.example.com/t54/topic-name1/ www.example.com/f2/forum-name1/ This leaves for the URL topic title in its own directory, which not only looks neater, but when searching in Google, the highlighted keywords are in its own directory. Whether or not this affects SEO, is not my main concern though, I really am just looking for neatness. I hope this can be considered as a revision in the next IPB update! Thanks for listening.
April 2, 201014 yr Im pretty sure the - needs to be there for the explode function to get the current forum. Not sure, but I think thats why they are there.
April 2, 201014 yr Actually the name is more or less irrelevant to IPB, as it relies solely on the number supplied. However, no matter what is done, the dash has to be there. It's odd really.
April 2, 201014 yr Not important suggestion. Everybody can change their own furlTemplate as want. I made it.
April 2, 201014 yr Not important suggestion. Everybody can change their own furlTemplate as want. I made it. He wants to have it like: /forums/t123/name-of-topic-here But that won't work. It has to have the dash after the topic number or it won't work. So it's kind of important for those who want to change the format.
April 2, 201014 yr Yes, I know, that didn't work in my case [url=" well. I use this format: http://community.invisionpower.com/topic-308090-friendly-url-suggestion-furltemplatephp
April 2, 201014 yr Yes, I know, that didn't work in my case [url=" well. I use this format: http://community.invisionpower.com/topic-308090-friendly-url-suggestion-furltemplatephp He doesn't want it like that, thus his request.
April 2, 201014 yr He wants to have it like: /forums/t123/name-of-topic-here But that won't work. It has to have the dash after the topic number or it won't work. So it's kind of important for those who want to change the format. :blink: What on Earth are you talking about?" alt="" class="ipsImage" width="1000px" height="729px"> 'showforum' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showforum=(.+?)(&|$)#i', 'f$1/#{__title__}/$2' ), 'in' => array( 'regex' => "#/f(d+?)/#i", 'matches' => array( array( 'showforum', '$1' ) ) ) ), The furl templates use regular expressions... you can pretty much make them what you want.
April 2, 201014 yr http://community.invisionpower.com/topic/299217-url-rewriting-help-regex/ I just tried your code and it fails for me. Pretty much, something about how it can never resolve. I think it's caught up in a never-ending loop.
April 2, 201014 yr Author It "works" as long as you don't use 301's to redirect. If you use 301's however, it goes into a never ending loop. But problems occur when you try installing apps that also use FURL. Now I can't use any apps, and they redirect to my forum home because my format is www.example.com/t#/topic-name/. Not sure what to do other than wait for a fix. I don't want the number included in the topic url, I suppose it is just personal preference, and to me, the looks of a url is important. Thus, in my case at least, I feel the FURL template is a bit limiting.
April 2, 201014 yr While I may be mistaken, I cannot think why that would be the case, and was unable to reproduce that. The code I posted it working fine for me (see the screenshot). Once you've made that change, you'll just need to rebuild the furl cache (just go to the ACP and you should be alerted to it). If it doesn't work, feel free to drop me a PM and I can take a look.
April 2, 201014 yr Just tried this on my dev board: 'showtopic' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showtopic=(.+?)(&|$)#i', 'topic/$1/#{__title__}/$2' ), 'in' => array( 'regex' => "#/topic/(d+?)/#i", 'matches' => array( array( 'showtopic', '$1' ) ) ) ), and it works fine
April 2, 201014 yr I've also just set it up on my new forum: http://www.modstation.com/index.php?/topic/59/existing-customers/
April 2, 201014 yr Author Try enabling mod rewrite, to eliminate index.php? by going here: tools and settings --> systems settings --> Use .htaccess mod_rewrite (set to yes, and apply changes to your htaccess file accordingly) Next, under the same setting, try redirecting your urls by heading to "Incorrect Permalink Handling" and choosing "redirect to correct link with a 301 header" Do you still get success with those settings?
April 2, 201014 yr While I may be mistaken, I cannot think why that would be the case, and was unable to reproduce that. The code I posted it working fine for me (see the screenshot). Once you've made that change, you'll just need to rebuild the furl cache (just go to the ACP and you should be alerted to it). If it doesn't work, feel free to drop me a PM and I can take a look. I had rebuilt the furl cache, as I think it'd just be confused about where to go otherwise and simply go to the main board index. I just now tried it with "Incorrect Permalink Handling" set to "Do Nothing" and that fixed the issue. A bug perhaps?
April 2, 201014 yr I wouldn't say a bug since you're modifying the code, but I'll see if that can be changed.
April 2, 201014 yr I wouldn't say a bug since you're modifying the code, but I'll see if that can be changed. It only happens when the setting is set to "Redirect to correct link with a '301' header." When setting it to redirect the old ?showxxxx=## to the new fURL format, and doing the 301 header, that works fine. It's only when the other setting is done.
Archived
This topic is now archived and is closed to further replies.