Search engine friendly URLs - Apache/Lighttpd only!

Discussion in 'SMF' started by Deprecated, Jun 4, 2018.

  1. Deprecated

    Deprecated Participant

    86
    13
    +12
    Without diving into the code but rather asking first if anybody has my answer before I have to dig...

    Can anybody tell me why the feature requires Apache etc.?

    As I said I haven't studied it yet, and only suspect it could require .htaccess URL rewriting. If that is all it is, I can easily strip the concept out of an Apache .htaccess file and implement the same thing in my Nginx server blocks.

    Or is it something else? I think it's smart to simply ask the community and see if somebody already knows the answer, rather than my doing a bunch of code diving.

    If I knew the reason behind the Apache etc. restriction it would make it easier in my code diving. Thanks!
     
  2. Pete

    Pete Flavours of Forums Forever

    1,773
    227
    +601
    Except it is nothing to do with htaccess.

    The feature relies on Apache doing something that Apache does, namely routing index.php/topic,1.0.html to index.php as per the CGI pathinfo construct.

    Nginx doesn’t support this. Neither does IIS.

    You could write something into nginx to support it, but why bother? It doesn’t get you anywhere.
     
  3. Tracy Perry

    Tracy Perry Opinionated asshat

    5,144
    492
    +3,539
    Maybe because they are not familiar with NGINX rewrites. That is typically the primary reason. For a long time (and maybe even still now) over on IPS support you could only get "official" support for Apache style rewrites.
    The only thing that I could find was that it "requires" AcceptPathInfo, which has an NGINX equivalent config setup for the vhost.
     
  4. Tracy Perry

    Tracy Perry Opinionated asshat

    5,144
    492
    +3,539
  5. Pete

    Pete Flavours of Forums Forever

    1,773
    227
    +601
    Not sure that actually generates the correct setup based on the example given.

    It needs to route domain.com/index.php/topic,1.0.html to index.php (note no ?) and pass in the rest of the URL as a parameter. The example in that article only talks about routing path/to/something/?var=foo which is a very different proposition indeed.

    Nor is that something out of the box, and even if it were done, the guts of SMF would have to be tweaked, all to get a slightly different URL structure, and not one that has any benefit for SEO, not in at least a decade.
     
  6. Tracy Perry

    Tracy Perry Opinionated asshat

    5,144
    492
    +3,539
    Yeah, but with some tweaking I'm sure it can be made to work.
    The main question is actually why has SMF restricted itself so severely? That might have been OK when Apache was the "king of the hill", but that was ages ago..

    Also, found this discussion over on the SMF forum from 4 years ago.
    https://www.simplemachines.org/community/index.php?topic=502045.0
     
    Last edited: Jun 4, 2018
  7. Pete

    Pete Flavours of Forums Forever

    1,773
    227
    +601
    Because when that code was written, nginx didn’t even exist.

    And the feature in question is off by default. Normal URLs like index.php?topic=1.0 work fine. It’s lterslly just the domain.com/index.php/topic,1.0.html format of URL that this covers. Again I’ll point out the key feature: no ? in the URL which is the part that separates page from options and was only necessary 10-15 years ago when search engines couldn’t work out that dynamic URLs could make duplicate content. This was solved years ago.

    I’m not sure this is in any way a practical limitation because it’s not a feature that helps anything, it does potentially break things though like addons...
     
  8. Deprecated

    Deprecated Participant

    86
    13
    +12
    Okay, I wrote my own CDS and I didn't use any SMF code but I used the same principle that you redirect all site accesses to loop around and go directly to the index. The the index looks at the requested URL and does stuff.

    It is too stupid simple when you realize how to do it. It doesn't require any fancy stuff at all. You just make index.php your 404 handler!

    All your images serve up just fine. Everything else that can't be found gets shoved in the index and the index figures out what the heck to do with it.

    Now that I've read the comments I see no reason to not do it to my test forum and fix anything that gets broken.

    I really appreciate the feedback, I think it shows that there is probably no reason this won't work on Nginx, other than maybe changing a bit of code and how you configure your server block.

    I think part of the problem is that most hosted service providers use straight LAMP so not that many people have access to Nginx, and nobody cared to test it out and see if it works, or fix whatever needs fixing and then share it.

    I will appreciate everybody's opinion if my plan is smart or stupid. If I can figure out what needs changing I can contact the SMF devs and share the info with them, and they can remove the warning notice, or add that it works on Nginx too.

    Or I can write a mod that fixes that one thing and send it on to the mod squad.

    The only thing is that nobody will be able to use it unless they are running Nginx and have access to the server blocks. Except it would make SMF more universal if I fix this.
     
  9. Pete

    Pete Flavours of Forums Forever

    1,773
    227
    +601
    You mean you want to fix a feature that the entire team discourages because it’s pointless? A feature that went out of date a decade ago?

    I don’t even understand how the comments about you building your own CDS fit with the feature you’re even talking about!

    This is why I have huge issues with you, it’s like a conversation of non-sequiturs!
     
  10. Deprecated

    Deprecated Participant

    86
    13
    +12
    Well Pete you have information that I don't have. I don't know what the entire team discourages because they don't talk to me.

    Please tell me why they discourage it. If it's no good then you can save me the work of coding it.

    My CDS uses human readable URLs, not numbers. I don't know if that helps or not but it doesn't hurt anything.

    Maybe you just don't have information I have, and I don't have information you have. Maybe we can share.
     
  11. Pete

    Pete Flavours of Forums Forever

    1,773
    227
    +601
    So as suspected you don’t want or need the feature you’re talking about with SMF since it doesn’t do what you think it does.

    SMF’s search engine friendly URLs doesn’t make them like your CDS. It literally makes them into index.php/topic,1.0.html instead of index.php?topic=1.0 and for what you want, try vbgamer’s Pretty URLs mod.

    You know, the same thing I’ve been saying this whole time that the feature won’t give you human readable URLs!
     
  12. Deprecated

    Deprecated Participant

    86
    13
    +12
    Here is the BIG question. Does your URL format even matter to search engines?

    Maybe I'm over-thinking this. Maybe it's like worrying if the under side of your auto is dirty.

    Maybe search engines used to have problems with complicated URLs and now they don't?

    Does VBG's Pretty URLs even do anything to help search engines index your site and increase your page ranks?
     
  13. Pete

    Pete Flavours of Forums Forever

    1,773
    227
    +601
    The answers to your questions are: Yes, yes, not really any more and no one can prove it either way unless they work for Google.
     
  14. Deprecated

    Deprecated Participant

    86
    13
    +12
    I'm laughing. :) (For everybody, Pete and I had a separate convo.)

    I think now that the stupid SMF feature we are discussing is probably useless, or nobody knows whether it makes any difference or not.

    Maybe the best thing to do is to just use your robots.txt to tell Google what to index and what not, and let Baidu and Yandex do whatever makes them happy, because whatever the Asians do just doesn't matter.
     
  15. Pete

    Pete Flavours of Forums Forever

    1,773
    227
    +601
    That’s not what I said.

    This SMF feature is now useless and has been for a decade.

    Does full pretty URLs help? No one knows for sure. But it sure looks nicer.
     
  16. mysiteguy

    mysiteguy Devotee

    2,538
    887
    +1,786
    "I believe that is a very small ranking factor." Google's John Mueller, 2016
    He was referring to keywords in the URL. Note "very small".
     
  17. Deprecated

    Deprecated Participant

    86
    13
    +12
    Yeah, I've accepted that SMF's built-in function is useless. The devs won't remove it because they don't want anybody to get butt hurt. And that's zero labor to just leave it alone. They'd rather fix other things that aren't broken.

    I'm pretty sure that URLs have so little effect if any that it's not worth the trouble to change the standard forum setup.

    My own CDS has pretty URLs more because it pleased the artistic half of my mind, so any SEO effect would be a byproduct that is probably minimal or zero.

    If this were a casino I'd place my money on "no effect."
     
Verification:
Draft saved Draft deleted
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.