Control URL like in WP, or at least limit its length

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Control URL like in WP, or at least limit its length

Post by pmfuser »

Hi,

I wonder if there is any plan to do as I noted in the subject?

The best would be if we could enter what we want to be as a URL when creating a new FAQ (like in WordPress). If not this, then at least to be able to shorten the length of the URL.
Here are a couple of limitations with hard coded URLs:

- In many of my cases, a new product version triggers changes in existing questions, rather than making a new ones. Changes are fine to be made, but the URL carries the version/name of the old product.
- As questions sometimes are lengthy, so are the URLs which makes them not so friendly if we need to redirect.

Thanks

P.S.
Also, I noticed that if I change the question, I end up with the both old and new URLs which creates duplicated content. How can this be resolved?
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Control URL like in WP, or at least limit its length

Post by Thorsten »

Hi,

please add a feature request for that: https://github.com/thorsten/phpMyFAQ/issues

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: Control URL like in WP, or at least limit its length

Post by pmfuser »

Thanks. Added a request for a new feature.

Also, as I see two URLs now, where the old URL is coming from? Would it be from revisions in MySQL table?

Thank you
pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: Control URL like in WP, or at least limit its length

Post by pmfuser »

Hi,

I just wanted to follow up to my last question:

Would removing revisions from MySQL resolve the problem of old URLs, after changing the existing question which created a new URL?

Thanks
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Control URL like in WP, or at least limit its length

Post by Thorsten »

Hi,

no, that will not help. Currently we do not check the slug of the rewritten URLs. So

http://faq.phpmyfaq.de/content/11/4/en/ ... ation.html

is the same like

http://faq.phpmyfaq.de/content/11/4/en/foo-bar-baz.html

I'll fix that as soon as possible with a check on the slug and a 301 redirect to the correct URL

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: Control URL like in WP, or at least limit its length

Post by pmfuser »

Thanks very much.

Last question about this:

Where the URLs are coming from?
or
How URLs get created?


Thank you
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Control URL like in WP, or at least limit its length

Post by Thorsten »

Hi,

the URLs are created on request. Maybe the GoogleBot has stored the old URL and visitors from Google now use the old URL.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: Control URL like in WP, or at least limit its length

Post by pmfuser »

Thorsten wrote: Maybe the GoogleBot has stored the old URL and visitors from Google now use the old URL.
It's not from Google, it's when I go and type the old URL, I get the new page.
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Control URL like in WP, or at least limit its length

Post by Thorsten »

Hi,

sure, it's the same. As I wrote, you can use all kinds of words between the last slash and the .html, only the IDs and the language string is important.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: Control URL like in WP, or at least limit its length

Post by pmfuser »

I see.

So the first number in URL is a category, and the second one is a question number, correct?

Since search engines look into the whole URL, maybe it would be useful to have a rewrite option that would strip all after the language part.


Thanks
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Control URL like in WP, or at least limit its length

Post by Thorsten »

Hi,

well, but when you can disable the rewrite rules ;-)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: Control URL like in WP, or at least limit its length

Post by pmfuser »

True. The more I tried to get into this, the more I was going back to URLs without rewrite.

Still, for the sake of fight against duplicate content, I believe that the best would be if the current URL is whatever it is and however is configured, but any other pointing to the same question returns 404. That's what search engines want.
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Control URL like in WP, or at least limit its length

Post by Thorsten »

Hi,

301 redirect to the new URL is much more user- and search engine friendly in my opinion.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: Control URL like in WP, or at least limit its length

Post by pmfuser »

Sure. How about having "fixed" URL (selected/created by an admin) and then a redirect line in HTACCESS that says any question with same ID goes to that specific URL?
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Control URL like in WP, or at least limit its length

Post by Thorsten »

Hi,

I'm working on a fix on that.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply