News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Pretty URLs

Started by SMFHacks.com Team, January 31, 2007, 10:56:43 AM

Previous topic - Next topic

colej2k

Have you tried to check the server error logs to see if anythings been left when you were testing ?

Mark H

#5801
There seems to be some errors that apply:

The forum seems to be redirecting to http://rabel.org.uk/index.php  in all cases.  The directory the forum is on is http://rabel.org.uk/rabel-forum/ .

Mark.

EDIT:

This is what I've got in my .htaccess :

# PRETTYURLS MOD BEGINS
# Pretty URLs mod
# http://code.google.com/p/prettyurls/
# .htaccess file generated automatically on: January 5, 2011, 18:23

RewriteEngine on
RewriteBase /rabel-forum

# Rules for: boards
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/?$ ./index.php?pretty;board=$1.$2 [L,QSA]

# Rules for: topics
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/?$ ./index.php?pretty;board=$1;topic=$2.$3 [L,QSA]

# PRETTYURLS MOD ENDS

Mark H

SOLVED!

It had nothing to do with mod_rewrite.  I had another set of rules in .htaccess (for Wordpress) that was causing a conflict.  :)

Mark.

apc896

#5803
Quote from: Mark H on January 05, 2011, 10:24:43 AM
Quote from: apc896 on January 04, 2011, 02:33:04 PM
Quote from: vbgamer45 on January 04, 2011, 02:30:02 PM
Try
Solved putting "queryless_urls" variable in smf_settings table to 0
Or disable querless urls settings

Thanks for your quick reply, can you explain it in layman's term for dummies pls?  :)

If you go into PHPmyAdmin (which you should be able to access through your web hosting package) and then select the smf database.  You should then be able to browse the smf_settings table...you're looking for a row called "queryless_urls".  Then change the variable from 1 to 0.

Thanks, I got the general idea... now I'm here... and I clicked around and dont know how to change it to "0".

I'm on this screen (see attachment).

Please advise.... thank you for helping out a newbie  :)





vbgamer45

Easy way quick on smf_settings table and browse it on the left hand side.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

apc896

#5805
Quote from: vbgamer45 on January 05, 2011, 03:50:16 PM
Easy way quick on smf_settings table and browse it on the left hand side.

what's "quick" on smf_settings table?


got it, that little icon on the left side of the link.... let me see if it works...

Mark H

I think VB meant "click".  If you find smf_settings on the left hand side, click on that and you should be able to click on the queryless_urls..click on the "1" and you should (hopes!) be able to change it to 0.

apc896


vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

vbgamer45

Pretty URLs 1.0 RC5                                                 5  January 2011
================================================================================
! Base: Fixed issue if queryless urls are enabled. Pretty urls will now disable them when enabling pretty urls to fix server errors.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Mark H

Quote from: vbgamer45 on January 05, 2011, 04:39:36 PM
Pretty URLs 1.0 RC5                                                 5  January 2011
================================================================================
! Base: Fixed issue if queryless urls are enabled. Pretty urls will now disable them when enabling pretty urls to fix server errors.

Brill!  Thanks for the mod...it is really useful. :)

glennk

Hi Guys,

I installed your reverter, but it doesnt work :

http://www.whitbyseaanglers.co.uk/forum/north-east-coast-fishing/the-bass-king-returns/0/

I would like to get these urls back to thier originals.


MaXiForum.cz

vbgamer45 can I only replace files from rc4?
Thanks :)

vbgamer45

Not really a mandatory update. Only update was to fix issues that some members had if it prettyurls wasn't working correctly.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

SirReal

I get tired of hacking pretty urls to work with lighttpd every time.
Perhaps you could include this diff to fix the darned quotation bug.

--- Subs-PrettyUrls.php 2010-01-31 16:41:00.000000000 +0100
+++ Subs-PrettyUrls.txt 2011-01-06 12:36:52.669173100 +0100
@@ -40,11 +40,11 @@
                'y'     =>      array ('y', 'Y', 'ý', 'Ã
                                                                        'z'     =>      array ('z', 'Z', 'ż', 'Å»', 'ź', 'Ź', 'ž', 'Ž', 'Î'),
                '-'     =>      array ('-', ' ', '.', ','),
+               ''      =>      array ("'", '"', "`"),
                '_'     =>      array ('_'),
                '!'     =>      array ('!'),
                '~'     =>      array ('~'),
                '*'     =>      array ('*'),
-               "\x12"  =>      array ("'", '"'),
                '('     =>      array ('(', '{', '['),
                ')'     =>      array (')', '}', ']'),
                '$'     =>      array ('$'),
@@ -130,16 +130,23 @@
        $pretty_board_urls = isset($modSettings['pretty_board_urls']) ? unserialize($modSettings['pretty_board_urls']) : array();
        $pretty_board_lookup_old = isset($modSettings['pretty_board_lookup']) ? unserialize($modSettings['pretty_board_lookup']) : array();

-       //      Fix old boards by replacing ' with \x12
-       $pretty_board_urls = str_replace("'", "\x12", $pretty_board_urls);
+       //      Fix old boards by replacing ' with ^
+       $pretty_board_urls = str_replace("'", "", $pretty_board_urls);
+       $pretty_board_urls = str_replace("\x12", "", $pretty_board_urls);
        $pretty_board_lookup = array();
        foreach ($pretty_board_lookup_old as $board => $id)
-               $pretty_board_lookup[str_replace("'", "\x12", $board)] = $id;
+       {
+               $pretty_board_lookup[str_replace("'", "", $board)] = $id;
+               $pretty_board_lookup[str_replace("\x12", "", $board)] = $id;
+       }

        //      Fix old topics too
        db_query("
                UPDATE {$db_prefix}pretty_topic_urls
-               SET pretty_url = REPLACE(pretty_url, '\\'', '" . chr(18) . "')", __FILE__, __LINE__);
+               SET pretty_url = REPLACE(pretty_url, '\\'', '')", __FILE__, __LINE__);
+       db_query("
+               UPDATE {$db_prefix}pretty_topic_urls
+               SET pretty_url = REPLACE(pretty_url, CHAR(18), '')", __FILE__, __LINE__);
        $context['pretty']['maintenance_tasks'][] = 'Fixing any old boards and topics with broken quotes';

        //      Get the board names


Yeah, it's not pretty and could use some cleanup, but basically, quotes aren't safe, so just nuke them.

glennk


eyo

switched to rc3 and i cant get this to install properly (can't find the edits needed) what version works well with rc3?

vbgamer45

That latest version should. Minor changes between rc3 and rc4 I suggest using a package parser to find the edits.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

MaXiForum.cz

Quote from: vbgamer45 on January 06, 2011, 01:40:45 AM
Not really a mandatory update. Only update was to fix issues that some members had if it prettyurls wasn't working correctly.

I am understand.
The change are in the database or only in the files?
Can I replace only files?
Thank you :)

Advertisement: