miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /  
 

How to solve a problem with the Keyword Friendly URL-addon?

 
Author karel1
Partaker
#1 | Posted: 27 Feb 2010 16:52 
Dear all,

First of all: I wanted to post this topic into the 'Addon'-forum, but there didn't appear a input field, so I couldn't post anything there.

Now, the problem. I installed the Keyword Friendly URL-addon yesterday and I followed all the setup-instructions in the Readme.txt file, but all the forum-pages lead to a dead link (404 error).

I used the third Keyword Friendly URL file and the URL displayed in the forum is ok. But the problem is that the URL doesn't lead to the right page.

So I think there's something wrong with the .htaccess file, but does anyone know what I could be?

Author kuopassa
Partaker
#2 | Posted: 28 Feb 2010 02:19 
Does the URL address in your forum have some special characters? If so, those should be mentioned in .htaccess code. For example, I had previously some case where a single thread had a dot (.) in URL address and that lead to 404 error. That error was easy to fix by putting missing dot inside .htaccess file. My problem occurred when I installed 2nd (or 1st, I don't remember) URL system, so the .htaccess has by default something like this:

RewriteRule ([0-9a-z_]+)-([0-9]+)-([0-9]+)-([-0-9]+)\.html$ ./index.php?action=vthread&forum=$2&topic=$3&page=$4&mdrw=on
RewriteRule ([0-9a-z_]+)-([0-9]+)-([0-9]+)\.html$ ./index.php?action=vthread&forum=$2&topic=$3&page=1&mdrw=on

Dots were inserted to URLs by altering the code to look like this:

RewriteRule ([0-9a-z_.]+)-([0-9]+)-([0-9]+)-([-0-9]+)\.html$ ./index.php?action=vthread&forum=$2&topic=$3&page=$4&mdrw=on
RewriteRule ([0-9a-z_.]+)-([0-9]+)-([0-9]+)\.html$ ./index.php?action=vthread&forum=$2&topic=$3&page=1&mdrw=on

Author karel1
Partaker
#3 | Posted: 28 Feb 2010 06:27 
Thanks for your reply, but there isn't a dot or special character in the title...

Something else?

Author kuopassa
Partaker
#4 | Posted: 28 Feb 2010 09:59 
Could you post here the contents of your .htaccess file? In that way we could check if there is something that should not be.

Author karel1
Partaker
#5 | Posted: 28 Feb 2010 10:13 
Sure:

RewriteEngine On
RewriteRule ^index\.html$ ./index.php?mdrw=on
RewriteRule ^manual\.html$ ./index.php?action=manual&mdrw=on
RewriteRule ^([0-9]+)_([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vthread&forum=$1&topic=$2&page=$3&mdrw=on
RewriteRule ^([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vtopic&forum=$1&page=$2&mdrw=on

Author kuopassa
Partaker
#6 | Posted: 1 Mar 2010 02:43 
I think that if you are using that 3rd URL scenario, you will need to insert your .htaccess file some rewrite things besides those. Open file addon_mod_rewrite_3.php and there should be on top of that commented out some codes.

Author Paul
Lead Developer 
#7 | Posted: 1 Mar 2010 05:38 
First of all, you need to be sure that .htaccess is supported by your server. It's not a must-have feature for any server. It is only for Apache servers, and it will be allowed only if your server provider enabled this module in the server's configuration. Usually, 404 error means that .htaccess directives are not supported by the server.

Author karel1
Partaker
#8 | Posted: 1 Mar 2010 11:38 
Thanks for your replies.

@kuopassa, I copied the whole .htaccess code from addon_mod_rewrite_3.php, so I don't think that's the problem.

@Paul, I know for sure that .htaccess is supported, because in the root-directory I already have a .htaccess which is running without problems.

Anything else maybe?

Author Paul
Lead Developer 
#9 | Posted: 2 Mar 2010 02:29 
You have .htaccess which is running without problems - but does it really have RewriteEngine functionality support? If it works in the root folder, it doesn't mean it should work in the sub folders.

I guess you shall contact your provider and ask him, not us... it's not a miniBB problem.

Author karel1
Partaker
#10 | Posted: 2 Mar 2010 09:18 
Thanks for your reply. I've asked it and they support RewriteEngine and also in sub folders.

Does anyone has other ideas?

Author Paul
Lead Developer 
#11 | Posted: 2 Mar 2010 09:48 
You may try other, simpler-format .htaccess file, just to check if it will work with PHP. For example:

RewriteEngine On
RewriteRule ^test\.htm$ ./test.php
where test.php is:

<?php
print_r($_SERVER);
?>
Now if you type in the browser's URL bar 'test.html' and if it points to $_SERVER array output of test.php, it means everything should work. Else... investigate it more deeply.

Also make sure you don't have anything else in .htaccess file which may conflict with miniBB rules.

The error you have, is a server-side error. Just to repeat - it's not miniBB fault!

Besides of it all, we don't have any more recommendations. It appears purely some fault on your side, which is impossible to determine without debugging and seeing files.

Author Paul
Lead Developer 
#12 | Posted: 2 Mar 2010 09:54 
Also, I am not quite sure - why did you have these .htaccess rules you provided? Numerical URLs are for default miniBB version only. Keywords won't work with that schema! Where did you take this code?

What kind of version number of Keyword Rich URLs add-on have you installed? Take rules from it's source. Each version has different rules located in the file itself.

Author karel1
Partaker
#13 | Posted: 2 Mar 2010 11:29 
Hi Paul,

OK, I'm going to try one and other. I use Keyword Rich URL nr. 3 and I took the rules from the addon_mod_rewrite_3.php file. Is that OK?

Author kuopassa
Partaker
#14 | Posted: 2 Mar 2010 11:35 
I don't remember if this is correct, but if you've got that keyword URL thingy installed, it might be needed to remove those old .htaccess rewrite rules out of the way. I mean that these two lines might be the sand on the engine:

RewriteRule ^([0-9]+)_([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vthread&forum=$1&topic=$2&page=$3&mdrw=on
RewriteRule ^([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vtopic&forum=$1&page=$2&mdrw=on

Author Paul
Lead Developer 
#15 | Posted: 2 Mar 2010 11:58 
You need this .htaccess for rules package #3:

RewriteEngine On

#forums
RewriteRule ^([0-9A-Za-z-\+_]+)-([0-9]+)/([0-9]+)/$ ./index.php?action=vtopic&forum=$2&page=$3&mdrw=on
RewriteRule ^([0-9A-Za-z-\+_]+)-([0-9]+)/$ ./index.php?action=vtopic&forum=$2&page=1&mdrw=on

#forums - handle no slash at the end
RewriteRule ^([0-9A-Za-z-\+_]+)-([0-9]+)/([0-9]+)$ ./index.php?action=vtopic&forum=$2&page=$3&mdrw=on
RewriteRule ^([0-9A-Za-z-\+_]+)-([0-9]+)$ ./index.php?action=vtopic&forum=$2&page=1&mdrw=on

#topics
RewriteRule ([0-9A-Za-z-\+._]+)-([0-9]+)/([0-9A-Za-z-\+._]+)-([0-9]
+)/([0-9]+)/$ ./index.php?action=vthread&forum=$2&topic=$4&page=$5&mdrw=on
RewriteRule ([0-9A-Za-z-\+._]+)-([0-9]+)/([0-9A-Za-z-\+._]+)-([0-9]
+)/$ ./index.php?action=vthread&forum=$2&topic=$4&page=1&mdrw=on

#topics - handle no slash at the end
RewriteRule ([0-9A-Za-z-\+_]+)-([0-9]+)/([0-9A-Za-z-\+_]+)-([0-9]+)/([0-9]+)$ ./index.php?action=vthread&forum=$2&topic=$4&page=$5&mdrw=on
RewriteRule ([0-9A-Za-z-\+_]+)-([0-9]+)/([0-9A-Za-z-\+_]+)-([0-9]+)$ ./index.php?action=vthread&forum=$2&topic=$4&page=1&mdrw=on
Add these rules with no breaking lines. I.e. 'mdrw=on' should be at the same line as the common rule.

Actually, these ones:
RewriteRule ^index\.html$ ./index.php?mdrw=on
RewriteRule ^manual\.html$ ./index.php?action=manual&mdrw=on
may be added too (it's on your wish and knowledge how it will work for you... not mandatory).

Specific miniBB Support Forums / Specific /
 How to solve a problem with the Keyword Friendly URL-addon?
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑