Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
1.4k views
in Q2A Core by
edited by
i try to edit a question, but the url permalink change too? not gooddd

3 Answers

+3 votes
by

Actually, I would say it is good. 

Try changing the last part of the permalink to this question, then hit enter to reload the new permalink.  It takes you here anyway.  The reason is, the title part of the permalink doesn't change the location of the page it refers to, since the number preceding it already tells q2a which question to load (it being the question's postid). 

The title is only for seo purposes, and so the fact that it changes when the question is edited is a good thing, imo.

by
I don't think its good. Lets say I change an old question that has already been indexed and ranked high on google with PR5, i change the title, and url permalink will automatically change too, and it will lose its PR back to 0.

Old link PR5 /qa/8666/when-editing-question-url-permalink-change-too
New link PR0 /qa/8666/when-editing-question-url-permalink-change-too2
by
Q2A uses the canonical meta tag, which acts almost identically to a 301 redirect, SEO-wise. So Google will load the old URL, discover what the new URL should be and show that one instead. It won't drop the page out of the ranking, and the PR will be transferred.
by
edited by
Hi Scott, the canonical URL changes as well if you edit the title, check your or this q2a forum. -> So the pagerank will actually be lost as indicated above.

For example, I changed my title-url-length from default 50 to 70 today. Many URLs changed. So I guess google will index all my questions again...
by
No, PageRank will not be lost. If you have a question at `/123/title` and you change to `/123/example`, when search engines visit `/123/title` they will see the correct URL for the page is now `/123/example`. It works pretty much like a 301 redirect.
by
Thanks Scott for making it clear. Now I understand.

1. The URL changes by changing the title.
2. If a search bot visits the old URL, the canonical tag holds the new URL!

Example: http://www.question2answer.org/qa/8666/when-editing-question-i-changed-the-url (see canonical)
0 votes
by
edited by

"The title is only for seo purposes, and so the fact that it changes when the question is edited is a good thing." NoahY

1. On the one hand, yes, good for users who want to find exact content and look to the URL.

2. On the other hand, no, google will index the changed URL as a new site. The canonical URL, mentioned by Scott, will not help as it changes as well. The canonical URL should be a fixed URL, e.g. just the number of the question: http://www.question2answer.org/qa/8666/

but then 1. will not work...

 

0 votes
by
reshown by

There are no redirect now.

http://www.question2answer.org/qa/8666/when-editing-ques
http://www.question2answer.org/qa/8666/when-editing-question-url-permalink-change-too2

not like Wordpress, Stackoverflow ( They do redirect to canonical link )

 

 

So try this in your theme (  qa-theme / YourTheme / qa-theme.php ) , I dont want modify Core.

class qa_html_theme extends qa_html_theme_base
{
    function WHAT EVER FUNC()
    {
       if (isset($this->content['canonical']) && count($_REQUEST) == 1 )  // Only   question page && just Read action
       {
            $req = $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
            $canoni_ori = $this - > content['canonical'];
            $canoni_uri = explode('://',$canoni_ori);
            $canoni_uri = $canoni_uri[1];
           
            if ($req != $canoni_uri)
            {
                 header("HTTP/1.1 301 Moved Permanently");
                 header("Location: $canoni_ori");
            }
       }
       
 
       ... THEME FUNC CODE ...
   }

 

 

Example site : 

http://qnacode.com/105

http://qnacode.com/105/blah-blah

 

Hope this help

...