News:

Join the Facebook Fan Page.

Main Menu

Pretty URLs

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

Previous topic - Next topic

Sir Osis of Liver

A large part of the problem seems to be that users don't know how to configure the mod correctly for the platform they're running on.  Most of these forums are on shared servers, many with crappy hosts, and the forum owners are clueless.  Maybe you can fine tune the default settings accordingly, or just remove some options that are problematic.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aaron10

Hi, since installing its been working great, however theres one small "glitch" in that the board index is reported to have a "noindex" meta in google webmaster tools. I have this + EhPortal installed on 2.1 RC2, so the URL for board index is mysite.com/forum/ rather than mysite.com/index.php. The noindex error only started happening since installing this mod.

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Gryzor

Question, triggered by above issue: seo-wise, if one uninstalls the mod, what steps should be taken? Wouldn't ranking tank?

Sir Osis of Liver

There's a reverter that's supposed to address that, but don't recommend it, it may cause more damage.  After the mod is uninstalled, site will be reindexed by search engines, doesn't take long.  Mod doesn't uninstall cleanly, you will have to manually clean up .htaccess and your database.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Gryzor

Thanks for the reply!

Regarding uninstalling the mod,I think just disabling its functionality through its options works pretty ok...

guldam

#7886
I had to switch my forum from https://myboards.com [nofollow] to https://www.myboards.com [nofollow]. PrettyUrls breaks links to the various boards by removing the www. If I turn off pretty urls the www is restored.  HELP!

SMF 2.0.15
PrettyUrls 1.0

Steveoh

guldam

Quote from: guldam on January 15, 2020, 12:56:51 PM
I had to switch my forum from https://myboards.com [nofollow] to https://www.myboards.com [nofollow]. PrettyUrls breaks links to the various boards by removing the www. If I turn off pretty urls the www is restored.  HELP!

SMF 2.0.15
PrettyUrls 1.0

Steveoh

UPDATE: I fixed the issue by adding this snippet <?php require_once(dirname(__FILE__) . '/SSI.php'); require_once($sourcedir '/Subs-PrettyUrls.php'); updateSettings(array('pretty_root_url' => $boardurl)); pretty_update_filters(); ?> to a new PrettyUrlFix.php file and then running it in my browser.

vbgamer45

Yes, that fixes glad that worked for you!
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

BARTHEZ

SMF 2.0.17
PrettyURL 2.1.4b
Errors when installing
    ./Sources/News.php
Find
if (empty($modSettings['queryless_urls']) || ($context['server']['is_cgi'] && @ini_get('cgi.fix_pathinfo') == 0 && @get_cfg_var('cgi.fix_pathinfo') == 0) || (!$context['server']['is_apache'] && !$context['server']['is_lighttpd']))
return $val;

$val = preg_replace('/^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+)(#[^"]*)?$/e', '\'\' . $scripturl . \'/\' . strtr(\'$1\', \'&;=\', \'//,\') . \'.html$2\'', $val);

Replace
/*** if (empty($modSettings['queryless_urls']) || ($context['server']['is_cgi'] && @ini_get('cgi.fix_pathinfo') == 0 && @get_cfg_var('cgi.fix_pathinfo') == 0) || (!$context['server']['is_apache'] && !$context['server']['is_lighttpd']))
return $val;

$val = preg_replace('/^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+)(#[^"]*)?$/e', '\'\' . $scripturl . \'/\' . strtr(\'$1\', \'&;=\', \'//,\') . \'.html$2\'', $val); ***/

    ./Sources/QueryString.php
Find
parse_str(substr(preg_replace('/&(\w+)(?=&|$)/', '&$1=', strtr(preg_replace('~/([^,/]+),~', '/$1=', substr($request, strpos($request, basename($scripturl)) + strlen(basename($scripturl)))), '/', '&')), 1), $temp);
if (function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc() != 0 && empty($modSettings['integrate_magic_quotes']))
$temp = $removeMagicQuoteFunction($temp);
$_GET += $temp;

Replace
if (strpos($request, basename($scripturl)) !== false)
{
parse_str(substr(preg_replace('/&(\w+)(?=&|$)/', '&$1=', strtr(preg_replace('~/([^,/]+),~', '/$1=', substr($request, strpos($request, basename($scripturl)) + strlen(basename($scripturl)))), '/', '&')), 1), $temp);
if (function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc() != 0 && empty($modSettings['integrate_magic_quotes']))
$temp = $removeMagicQuoteFunction($temp);
$_GET += $temp;
}

vbgamer45

You have it working now?
I didn't get install errors on a new 2.0.17
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

BARTHEZ

Yes I got all the time this error. Maybe I should replace system file responsible for installing mods?

BARTHEZ


Xpresskonami

Anytime i try to upload attachment, I got this error

Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to allocate 4570229 bytes) in /public_html/Sources/PrettyUrls-Filters.php on line 114

vbgamer45

If you disable the pretty url filters and upload the attachment does it work?
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

Xpresskonami

Quote from: vbgamer45 on January 29, 2020, 10:21:35 PM
If you disable the pretty url filters and upload the attachment does it work?

No I have not disable the pretty url and chk...
If I disable the pretty url, I always have problem with canonical url. And this always cause huge sitemap decrease in Google webmaster tools...



vbgamer45

Can you try I just want to see if pretty urls is the cause or not.
You can turn it back on afterwords.
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

Xpresskonami

Quote from: vbgamer45 on January 30, 2020, 12:42:10 PM
Can you try I just want to see if pretty urls is the cause or not.
You can turn it back on afterwords.

Yes. I disabled the pretty url and Everything works fine.
No error when I add attachment.

Xpresskonami

How can I fix the error please

vbgamer45

If you are on SMF 2.0.
Copy this file to Sources folder and see if it helps...
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

Advertisement: