Permalink.create Not working with Arabic slug!

Hi

Simply my old bbpress used only slugs within Arabic characters no id only /post-title

Therefore, when trying to use Permalink.create(url: '/Arabic-title', topic_id: 3708), Permalink is being created, but the link is not working, and it gives the link that it does not exist

The problem is that I have more than 12,000 links spread across the Internet that use Arabic slugs, I don’t need to lose all these backlinks.

I am currently using htaccess on the old server to redirect 301(/Arabic-title TO newdiscourse/t/topic_id ), but with 12,000 links, the file size has become 2MB, and I am worried that it may make the redirect 301 slow, but everything works fine

Any suggestion, please?

What I would do is start with a trivial example with just a character or two. I can’t remember if the URL is supposed to start with a leading // or whether it matters (it likely does not, but it’s the first thing I’d try).

1 Like

Indeed, I have tried Permalink.create with 2 or 3 links, and I have tried with // and without, but the same Permalink.create for English links works, but if the link uses Arabic slugs, it does not work…

1 Like

So the old server and the new one have different host names? I’d probably stick with that. It can’t matter much if the 301s are slow on the old server since only 301 are going there.

If no one from team chimes in, the next thing you could do would be to try to add don’t debugging to core to see exactly what it’s looking for. It’s conceivable that it is a bug, as Arabic may not be tested and rtl could play in some way. (That’s all speculation.) Maybe try a 3 character slug backward?

I really appreciate your reply. @pfaffman

Sure, the old server have different host name and only host htaccess file with 12k old links redirect 301 and work fine. Like I said am only worried about the redirect speed.

I believe should I skip use permalink option

1 Like