SMF pretty URL's mod means no 404?!

Started by shteca, January 06, 2013, 11:22:53 AM

Previous topic - Next topic

shteca

Hi
I have SMF 2.0 with pretty URL's installed. But now, when i put in a random url like
/teudfhdjdywyueje
it just redirect to homepage. It does not show a 404 error...
This is a huge problem...

How do i fix this, i tried adding
ErrorDocument 404 /404.php
to htaccess but this did nothing. I have a custom 404 page at /404.php but how do i point 404 errors to this?
Do i need to uninstall pretty urls?

Arantor

SMF does that without pretty URLs too...

It's a tenet of how SMF is designed, really.

shteca

Why? this is not good :)

I will make Google confused!!! :-[ :'(

Arantor

Only if people link to those URLs.

Google doesn't spontaneously go to pages that don't exist.

shteca

Yes but e.g. is if I make a topic or add a mod, then uninstall and it has made pages on the forum and then they get removed, Google will never know to de index them.

Or if i remove a post, Google will always index it. It will never know its a 404

Arantor


shteca

humph!

I have messed up my forum now...

I installed http://custom.simplemachines.org/mods/index.php?mod=2222 and now i cant access my admin panel!!!

how do i remove this mod without going into my admin panel?

mashby

Reverse the parsing instructions in the mod's download page (parser is over on the right) and edit your site's files accordingly. Did you get any errors installing it though?
Always be a little kinder than necessary.
- James M. Barrie

shteca

No, it installed fine, but now all pages on the forum are showing 404 error.

Its a crappy mod and now its killed all my site pages

shteca

Ok, I managed to do it by removing all added lines from htaccess

Then just uninstalled the mod and deleted.

shteca

Buy basically there is no way to add a custom 404 page to SMF forums...

Arantor

Not without a lot more work because it's not just a case of having the error handler - anything that gets to index.php will be caught by SMF, and it needs to be rearchitected to handle that better - it's a huge task.

mashby

Sure there is. Did you do this step in the download page for the mod?
QuoteNote (1): (English)
To open the file htaccess.txt and in this line:
ErrorDocument 404 /index.php?action=Error404
To add if they have his forum in other one folder for example if his forum this one in www.yoursite.com/foro
ErrorDocument 404 /foro/index.php?action=Error404
Then To raise the root of his(her,your) domain(control) and to rename to .htaccess

Note (2): (English)
If you use another htaccess in the root of the domain(control) it(he,she) has to abrilo and add the line
ErrorDocument 404 /index.php?action=Error404
And to repeat previous step

I made a 404 page on my site with a mod using htaccess. However on further inspection it doesn't work so much on index.php as Arantor points out.
ErrorDocument 404 /404.shtml
Always be a little kinder than necessary.
- James M. Barrie

shteca

QuoteNote (1): (English)
To open the file htaccess.txt and in this line:
ErrorDocument 404 /index.php?action=Error404
To add if they have his forum in other one folder for example if his forum this one in www.yoursite.com/foro
ErrorDocument 404 /foro/index.php?action=Error404
Then To raise the root of his(her,your) domain(control) and to rename to .htaccess

Note (2): (English)
If you use another htaccess in the root of the domain(control) it(he,she) has to abrilo and add the line
ErrorDocument 404 /index.php?action=Error404
And to repeat previous step

To be honest this English is not very good and I can't understand what they are trying to say.

I installed the mod but it didn't work...

mashby

I'll try to simplify it then...
Add this to your .htaccess file:
ErrorDocument 404 /index.php?action=Error404If you don't have one, make one and add that line to it.
Always be a little kinder than necessary.
- James M. Barrie

shteca

/index.php?action=Error404

Will this direct to my 404.php file in my root?

I have a file here techyduck.com/404 this is a custom 404 page.

shteca

And tried to add that, it still does nothing.

I think in the SMF coding it is telling it to ignore any 404 errors and just redirect them to homepage.

So i think there needs to be a mod that can remove this coding and replace with a 404 option

mashby

OK, I can move this topic to the Mod Request board if you'd like...
Always be a little kinder than necessary.
- James M. Barrie

shteca

Yes please! I am so surprised this isn't a built in feature with SMF.

Kindred

that mod works just fine....   I have it installed and working on 40konline - and there are no problems at all...


Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

And all of this pales into insignificance with the fact that almost nothing will ever be directed to the 404 handler in the first place ;)

Kindred

hmmm?   It does for me, Arantor.

http://www.40konline.com/blah

it is true that http://www.40konline.com/index.php?action=blah will NOT bounce to the 404... but the other one will...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Yes, *real* 404s will. But nothing from within index.php will be, which when pretty URLs is concerned, could be almost anything.

Kindred

oh... true...   Pretty urls has to be one of the stupidest mods to apply, IMHO
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Same is true of SimpleSEF, though, and for exactly the same reason - and ultimately it's just because some people do want prettier looking URLs even if there isn't an SEO benefit.

shteca

Do you have pretty URL mod?

Did you follow the instructions or just install?

Can you give some more info?

What is your site?

Arantor

Kindred doesn't use the pretty URLs mod, I have done but I have a very heavily modified version to play with (and no, I can't share it, don't even ask)

The fact remains that it doesn't matter: once anything is redirected to SMF's index.php, whether it's done via pretty URLs or not, it's basically never going to generate a 404 no matter what you do because SMF just does not operate like that.

shteca

Yeah.

Will SMF every add this to an update?

Arantor

What, adding pretty-but-no-SEO-use URLs or rewriting all the handling to add 404 handling?

The former is unlikely, the latter only marginally less so.

shteca


Arantor

Nah. The amount of effort to implement it is not trivial.

Advertisement: