Search engine friendly URLs - Apache/Lighttpd only!

Deprecated

Participant
Joined
May 22, 2018
Messages
86
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!
 

Pete

Flavours of Forums Forever
Joined
Sep 9, 2013
Messages
2,792
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.
 

Pete

Flavours of Forums Forever
Joined
Sep 9, 2013
Messages
2,792

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.
 

Pete

Flavours of Forums Forever
Joined
Sep 9, 2013
Messages
2,792
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...
 

Deprecated

Participant
Joined
May 22, 2018
Messages
86
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.
 

Pete

Flavours of Forums Forever
Joined
Sep 9, 2013
Messages
2,792
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!
 

Deprecated

Participant
Joined
May 22, 2018
Messages
86
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.
 

Pete

Flavours of Forums Forever
Joined
Sep 9, 2013
Messages
2,792
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!
 

Deprecated

Participant
Joined
May 22, 2018
Messages
86
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?
 

Pete

Flavours of Forums Forever
Joined
Sep 9, 2013
Messages
2,792
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.
 

Deprecated

Participant
Joined
May 22, 2018
Messages
86
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.
 

Pete

Flavours of Forums Forever
Joined
Sep 9, 2013
Messages
2,792
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.
 

mysiteguy

Fanatic
Joined
Feb 20, 2007
Messages
3,619
"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".
 

Deprecated

Participant
Joined
May 22, 2018
Messages
86
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."
 
Top