Pretty URLs

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

Previous topic - Next topic

vitalik82

Quote from: aishaweb on March 10, 2009, 11:59:48 AM
From the 1st post in this thread:

http://code.google.com/p/prettyurls/wiki/TroubleShooting

Thanx! Everything back to normal!

How can I find out what went wrong?

RAN

Hi,

I have SMF 1.1.8
Pretty URLs 0.9 and Sitemap 1.2.2 installed.

The problem is when I try use xml link I go to the http://www.yyyyy.yyy/sitemap/?xml

I think is a .htaccess problem.
I try to modify the .htaccess without success.

Try to use
RewriteRule ^sitemap.xml$ /index.php?action=sitemap;xml - dosen't work
RewriteRule ^(sitemap.xml)/?$ ./index.php?pretty;action=$1 [L,QSA] - dosen't work

Can you help me please
I try find the answer in tis forum but without success.

Thank you for your great help

PalmBeachPreps

 :( Downloaded it and got this warning:
Quote

Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.
Install Actions
Installations actions for "Pretty URLs":
Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./index.php    Test successful
2.    Execute Modification    ./SSI.php    Test successful
3.    Execute Modification    ./Sources/Admin.php    Test successful
4.    Execute Modification    ./Sources/ManageErrors.php    Test successful
5.    Execute Modification    ./Sources/ModSettings.php    Test successful
6.    Execute Modification    ./Sources/News.php    Test failed

aishaweb

Please read at least a few pages back in the thread before posting problems.

videogamemojo

Hello there,
Currently have the latest version of Tiny Portal and sitemap running.  Upon trying to install Pretty Urls there is a test failure for ./Sources/News.php. This is the only file not working correctly.  Any suggestions for quick fixes or perhaps I could simply ignore this error as it only affects said file?  Thanks for the help.
Visit http://www.videogamemojo.com and "Get Your Mojo On!"

aishaweb

Quote from: aishaweb on March 12, 2009, 12:55:08 PM
Please read at least a few pages back in the thread before posting problems.

lennybruce71

Hi all,

Does last version of pretty urls work properly with the last version of sitemap for SMF 2.0 b4?

In my box, it doesn't work. URLs returned by XML sitemap are not SEO. SlammedDime (author of sitemap) suggests me:

"I'm not sure how Pretty Urls works in SMF 2.0, versus 1.1.x, and since version 2.0.0 of this mod uses SMF functions to change the url into a SEF version without pretty urls, you'd have to ask him how he handles the fix_possible_url function in News.php." 

Have you any hints?

Thanks a lot!
emiliano

kichu

I installed Pretty URLs , Installed succesfully... but links are showing like

http://site.com/something/sometopic

like this , but i want to add .html in ending

http://site.com/something/sometopic.html

like this ... how to do it ?

lennybruce71

Kicku, which SMF version are you using?
Anyway, having .html suffix is not important for SEO. It is just a cosmetic issue! :)

e.

bazo

hi, first excuse me for my bad english, i'm french lol.

So, it was 2 months i installed pretty, for the URLrewriting i have no soucy, but the table smf_pretty_urls_cache grow up every time, i'm oblige to clean the table, because i'm limite at 40 Mo and every 3 days i clean up the table.

If you have a answer i will be happy. Thanks.

kichu

ok thank you lenny , then i wont change it .. :)

RAN

#3252
Hi,

Can you help me with this error please?

When I disable Pretty Urls XML works ok but when is enable gives me a error. I think is associate with style.css

"The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. "

Can you look on http://www.topcasinowagering.com/sitemap/ and click on XML please?

Any tips?

Thank you for your help. 

lennybruce71

Hi All,

I debugged it (pretty urls with Sitemap 2.0) and I found out the issue (but not the solution :)
In a few words prettyurls cut off all links that are not coming from html tags:

This is a snippet from Prettyurls-Filters.php

// Find all URLs in the buffer
$context['pretty']['search_patterns'][] = '~(<a[^>]+href=|<link[^>]+href=|<form[^>]+?action=)(\"[^\"#]+|\'[^\'#]+)~';


As you can see it considers ONLY urls taken from <a>,<link><form> html tags (and only if they are rounded by ' or ").

In this way <loc> ones are cut out for two regexp groups:
1) they are inside a NOT considered tag (<loc></loc>)
2) they don't have ' ore " quotes.

I'm not able to modify they rexexp to include these one as well. Could you help me? :)

thanks,
emiliano

Dannii

Hi everyone,

I was waiting to fix another bug before releasing 0.9.2, but because of the News.php problem I've updated the 0.9.1 package. If you've had problems please download it again.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Dannii

Quote from: gnowak on March 08, 2009, 12:01:41 PM
On a clean install of SMF 1.1.8 I still get the error for News.php.

After the install i get this error in SMF:
Parse error: syntax error, unexpected '*' in /var/www/SMFclean/Sources/QueryString.php on line 537

QueryString.php passed the install test though?
The mod has been installed twice. You'll need to go through all the changes and check they were only applied once.

Quote from: grfkdesign on March 08, 2009, 02:01:51 PM
I installed this mod without problems, I did all of the said changes to my files as instructed in the read me, I set the permissions for the gallery in admin, I set the galleries settings and I see nothing on my site. Whats up? Thanks in advance for any replies. :)
Checked your error logs? Are you sure this isn't an error with your gallery?

Quote from: GurusBlog on March 08, 2009, 11:16:31 PM
I installed this mod and all is ok but is showing "short urls" http://example.com/investing instead of "long ones" http://www.example.com/investing . How can I do for showing "long urls" in order to work as the rest of my site?? Thank you
Use repair_settings.php, also change pretty_root_url in smf_settings.

Quote from: Mr.Perez on March 09, 2009, 01:00:33 PM
What are pretty urls?
Prettier than your average SMF URL? Have a look at any of the sites people link to...

Quote from: vitalik82 on March 10, 2009, 12:20:47 PM
Thanx! Everything back to normal!

How can I find out what went wrong?
Check your SMF and Apache error logs.

Quote from: lennybruce71 on March 13, 2009, 05:28:51 AM
Hi all,

Does last version of pretty urls work properly with the last version of sitemap for SMF 2.0 b4?

In my box, it doesn't work. URLs returned by XML sitemap are not SEO. SlammedDime (author of sitemap) suggests me:

"I'm not sure how Pretty Urls works in SMF 2.0, versus 1.1.x, and since version 2.0.0 of this mod uses SMF functions to change the url into a SEF version without pretty urls, you'd have to ask him how he handles the fix_possible_url function in News.php." 

Have you any hints?

Thanks a lot!
emiliano
Hmm, probably the same way as before, by putting the page through pretty_rewrite_buffer, possibly with some extra patterns.

Quote from: bazo on March 13, 2009, 08:33:48 AM
hi, first excuse me for my bad english, i'm french lol.

So, it was 2 months i installed pretty, for the URLrewriting i have no soucy, but the table smf_pretty_urls_cache grow up every time, i'm oblige to clean the table, because i'm limite at 40 Mo and every 3 days i clean up the table.

If you have a answer i will be happy. Thanks.
The table is required, otherwise the extra queries would add too much load. If you are limited to only 40MB you need a new host!

Quote from: RAN on March 13, 2009, 01:07:25 PM
Hi,

Can you help me with this error please?

When I disable Pretty Urls XML works ok but when is enable gives me a error. I think is associate with style.css

"The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. "

Can you look on http://www.sharing-forums.com/sitemap/ and click on XML please?

Any tips?

Thank you for your help. 
Can you check your error logs? The page is blank... some error should be listed.

lennybruce71, check what I wrote on the issue tracker.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

lennybruce71

#3256
Ok, I did it.

This fix allow prettyurls mod (0.9.1) to work properly with Sitemap (2.0)
(http://custom.simplemachines.org/mods/index.php?mod=755). Now all
urls inside xml sitemap are seo.

You should change PrettyUrls-Filters.php in this way:

search line (#19):

$context['pretty']['search_patterns'][] = '~(<a[^>]+href=|<link[^>]+href=|<form[^>]+?action=)(\"[^\"#]+|\'[^\'#]+)~';

and replace with:

$context['pretty']['search_patterns'][] = '~(<a[^>]+href=|<link[^>]+href=|<form[^>]+?action=|<loc>)(\"[^\"#]+|\'[^\'#]+|[^<]+)~';

Again, search line(#38):

$context['pretty']['replace_patterns'][] = '~(<a[^>]+href=|<link[^>]+href=|<form[^>]+?action=)(\"[^\"#]+|\'[^\'#]+)~';

and replace with:

$context['pretty']['replace_patterns'][] = '~(<a[^>]+href=|<link[^>]+href=|<form[^>]+?action=|<loc>)(\"[^\"#]+|\'[^\'#]+|[^<]+)~';


Working demo: http://www.acufeniforum.net/sitemap.html [nofollow]
(With SMF 2.0 beta4, SiteMap 2.0, prettyurls 0.9.1)

d03boy


GurusBlog

Quote from: Dannii on March 15, 2009, 09:41:47 AM

Quote from: GurusBlog on March 08, 2009, 11:16:31 PM
I installed this mod and all is ok but is showing "short urls" hxxp:example.com/investing [nonactive] instead of "long ones" hxxp:www.example.com/investing [nonactive] . How can I do for showing "long urls" in order to work as the rest of my site?? Thank you
Use repair_settings.php, also change pretty_root_url in smf_settings.


Sorry but when you say "in smf_settings" is that a .php file?? where can I find smf_settings??

GurusBlog

Quote from: GurusBlog on March 15, 2009, 08:54:57 PM
Quote from: Dannii on March 15, 2009, 09:41:47 AM

Quote from: GurusBlog on March 08, 2009, 11:16:31 PM
I installed this mod and all is ok but is showing "short urls" hxxp:example.com/investing [nonactive] instead of "long ones" hxxp:www.example.com/investing [nonactive] . How can I do for showing "long urls" in order to work as the rest of my site?? Thank you
Use repair_settings.php, also change pretty_root_url in smf_settings.


Sorry but when you say "in smf_settings" is that a .php file?? where can I find smf_settings??

Ok, I found it...Is a table of the database...Thank you

Advertisement: