2.69 the .htacess Page Not Found

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
aa123aa
Posts: 27
Joined: Sat Apr 03, 2010 1:33 pm

2.69 the .htacess Page Not Found

Post by aa123aa »

hi , sir.when i change .htacess , i only change:
# PMF faq record page
# * http://[...]/content/1/1/<LANGUAGE CODE>/<FAQ TOPIC>.htm
# * http://[...]/content/1/1/<LANGUAGE CODE>/<FAQ TOPIC>.html
RewriteRule content_([0-9]+)_([0-9]+)_([a-z\-]+)_(.+)\.htm(l?)$ index.php?action=artikel&cat=$1&id=$2&artlang=$3 [L,QSA]

when i see the website index, but the acticle link can't to view , it show Page Not Found,
i can use the content_1_5_zh_file.html . it is ok .
but from index page, into the content title, the link is the same:
content/1/5/zh/file.html
but it can't to open.
why ? how to do it ?

if there is a cache to update all the link . that is good to change the .htacess
Thorsten
Posts: 15815
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: 2.69 the .htacess Page Not Found

Post by Thorsten »

Hi,

you can use both rewrite rules, for old links and new links.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
aa123aa
Posts: 27
Joined: Sat Apr 03, 2010 1:33 pm

Re: 2.69 the .htacess Page Not Found

Post by aa123aa »

Thorsten wrote:Hi,

you can use both rewrite rules, for old links and new links.

bye
Thorsten
thank you Thorsten. but i want to only use new links.
why the index page is no use the new links? i have changed the .htacess. why don't it auto change index page? how to change it?
Thorsten
Posts: 15815
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: 2.69 the .htacess Page Not Found

Post by Thorsten »

Hi,

it uses the index page as / in the code itself, also our link generation code is only supporting the new link structure. Can I test this issue on your FAQ?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
aa123aa
Posts: 27
Joined: Sat Apr 03, 2010 1:33 pm

Re: 2.69 the .htacess Page Not Found

Post by aa123aa »

Thorsten wrote:Hi,

it uses the index page as / in the code itself, also our link generation code is only supporting the new link structure. Can I test this issue on your FAQ?

bye
Thorsten
i have sent message to you.
thank you!
aa123aa
Posts: 27
Joined: Sat Apr 03, 2010 1:33 pm

Re: 2.69 the .htacess Page Not Found

Post by aa123aa »

the question is still wrong. please help me . thank you!
Thorsten
Posts: 15815
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: 2.69 the .htacess Page Not Found

Post by Thorsten »

Hi,

I found your issue. You have to patch the file inc/Link.php as well, beginning from line 488:

Old code:

Code: Select all

                        case self::PMF_LINK_GET_ACTION_ARTIKEL:
                            $url .= self::PMF_LINK_CONTENT . 
                                    $getParams[self::PMF_LINK_GET_CATEGORY] . 
                                    self::PMF_LINK_HTML_SLASH . 
                                    $getParams[self::PMF_LINK_GET_ID] . 
                                    self::PMF_LINK_HTML_SLASH . 
                                    $getParams[self::PMF_LINK_GET_ARTLANG] . 
                                    self::PMF_LINK_SLASH . 
                                    $this->getSEOItemTitle() . 
                                    self::PMF_LINK_HTML_EXTENSION;
                            if (isset($getParams[self::PMF_LINK_GET_HIGHLIGHT])) {
                                $url .= self::PMF_LINK_SEARCHPART_SEPARATOR . 
                                        self::PMF_LINK_GET_HIGHLIGHT . '=' . 
                                        $getParams[self::PMF_LINK_GET_HIGHLIGHT];
                            }
                            if (isset($getParams[self::PMF_LINK_FRAGMENT_SEPARATOR])) {
                                $url .= self::PMF_LINK_FRAGMENT_SEPARATOR . 
                                        $getParams[self::PMF_LINK_FRAGMENT_SEPARATOR];
                            }
                            break;
New code:

Code: Select all

                        case self::PMF_LINK_GET_ACTION_ARTIKEL:
                            $url .= self::PMF_LINK_CONTENT . 
                                    $getParams[self::PMF_LINK_GET_CATEGORY] . 
                                    self::PMF_LINK_HTML_UNDERSCORE . 
                                    $getParams[self::PMF_LINK_GET_ID] . 
                                    self::PMF_LINK_HTML_UNDERSCORE . 
                                    $getParams[self::PMF_LINK_GET_ARTLANG] . 
                                    self::PMF_LINK_UNDERSCORE . 
                                    $this->getSEOItemTitle() . 
                                    self::PMF_LINK_HTML_EXTENSION;
                            if (isset($getParams[self::PMF_LINK_GET_HIGHLIGHT])) {
                                $url .= self::PMF_LINK_SEARCHPART_SEPARATOR . 
                                        self::PMF_LINK_GET_HIGHLIGHT . '=' . 
                                        $getParams[self::PMF_LINK_GET_HIGHLIGHT];
                            }
                            if (isset($getParams[self::PMF_LINK_FRAGMENT_SEPARATOR])) {
                                $url .= self::PMF_LINK_FRAGMENT_SEPARATOR . 
                                        $getParams[self::PMF_LINK_FRAGMENT_SEPARATOR];
                            }
                            break;
I didn't test this, but should work.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
aa123aa
Posts: 27
Joined: Sat Apr 03, 2010 1:33 pm

Re: 2.69 the .htacess Page Not Found

Post by aa123aa »

thank you .
but i use new code in it to test.
show wrong:

Fatal error: Undefined class constant 'PMF_LINK_UNDERSCORE' in /home/content/x/z/f/xzfree/html/inc/Link.php on line 491
Post Reply