Pretty URLs

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

Previous topic - Next topic

Dannii

Were there any errors when you installed it?
"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."

mladja04

No, site work with old apache url rewrite. I try to disable url rewrite in admin area, but than ugli link are visible, no preety links!

http://www.velikibrat.us/forum/ is my site

viulian

Quote from: eldʌkaː on September 07, 2007, 09:57:53 AM
Hmm wait... you're using english-utf8? Are you specifically using the english-utf8 files, or just UTF8 with english? I don't think I have the proper utf8 english files as I don't think they were needed.

Yup.. I got a bunch of files from simple machine site a while ago when I decided to switch to UTF-8. There were two bundles claiming they are english utf8 - and I picked the one that seemed most likely to be what I was after.
I ended up with:

Admin.english-utf8.php
Errors.english-utf8.php
....

I have the non UTF-8 too (such as Admin.english.php).

Then I my Settings.php I put:

$language = 'english-utf8';

And it worked.

L.G.S

When I try to install this I get a 500 Internal Server Error. All files installed fine on the test page. The Pretty URLS footer is there but the options to change the filters is not!
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


viulian

I got an Internal Server Error (when installing Pretty URL) a while ago, due to the fact that Apache did not have mod_rewrite active and so, it did not know how to interpret the newly created .htaccess file.

Dunno if it helps, but wanted to point it out for reference.

L.G.S

Sorry no idea what that means ^^

Going in manually..........
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


L.G.S

Alright I installed all files but it hasn't made a difference...

Does this mod need a htaccess? Because it hasn't been added after running the install.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


L.G.S

Got this from the SEO4SMF redirect script:

Fatal error: Call to undefined function: upretty_update_filters() in /home/tscar/public_html/board/Packages/temp/install.php on line 47

And got this from the standard install script:

Parse error: syntax error, unexpected T_STRING in /home/tscar/public_html/board/install.php on line 26
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


viulian

Well, it should generate the .htaccess file itself - as it has to redirect from the old style URLs to the new ones.

I have one it generated in the /community/ folder:

#       Pretty URLs mod
#       http://code.google.com/p/prettyurls/
#       .htaccess file generated automatically on: September 5, 2007, 0:24

.....


L.G.S

Any chance you can post your htaccess full code here please? Unless you have your own changes to it, that is.

However seeing as the install didn't work I don't think it will make a difference, because nothing in install.php has actually been installed :(
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


viulian

Sure:

#       Pretty URLs mod
#       http://code.google.com/p/prettyurls/
#       .htaccess file generated automatically on: September 5, 2007, 0:24

RewriteEngine on

#       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?pret
ty;board=$1;topic=$2.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|n
ew)/?$ ./index.php?pretty;board=$1;topic=$2.$3 [L,QSA]


I got errors too when installing the mod - what helped was actually turning on the Forum Error Log (I turned it off myself cos nothing really happens there) but it did catch some errors.
But Forum Error Log is not too helpful.

Better is if you have access to the Apache's error-log file. I got to it via SSH but I kinda remember that CPanel was also able to show Apache's error log.

L.G.S

I tried the htaccess but its giving me internal server errors... hmmmm
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


viulian

Please try an .htaccess file with only one line:

RewriteEngine on

If you still get errors, then you should check httpd.conf (Apache's config file) that the line:

LoadModule rewrite_module modules/mod_rewrite.so

doesn't have a # in front. The line should be uncommented.

viulian

eldʌka, can you please add the two chars below to the list that gets converted to 't' (so they'll be there in the next version)?

The chars are: ţ and Ţ

Thanks!

L.G.S

#674
Quote from: viulian on September 07, 2007, 05:04:24 PM
Please try an .htaccess file with only one line:

RewriteEngine on

If you still get errors, then you should check httpd.conf (Apache's config file) that the line:

LoadModule rewrite_module modules/mod_rewrite.so

doesn't have a # in front. The line should be uncommented.

Well I know rewrite works because I used it for SEO4SMF.

But I tried anyway, and yes it works.

Is the mod supposed to remove the Search Engine Friendly links option in features? Maybe I changed the wrong code manually because it's not there.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


L.G.S

BTW when I have Enable URL Filtering my forum stops loading whenever I try to go into a forum. Do I need this ticked to use Pretty URLS?
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


viulian

Yeah, you need to have the filters enabled..
About the 500 errors though, I am out of ideas :(

L.G.S

Really no idea how the site won't even load (get a not responding message when the feature is enabled) when the box is ticked.

Guess I gotta wait for Eld to get back,
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Dannii

#678
QuoteNo, site work with old apache url rewrite. I try to disable url rewrite in admin area, but than ugli link are visible, no preety links!

http://www.velikibrat.us/forum/ is my site
If it installed properly it should be impossible to have the old apache rewrites because that code was completely removed.

QuoteYup.. I got a bunch of files from simple machine site a while ago when I decided to switch to UTF-8. There were two bundles claiming they are english utf8 - and I picked the one that seemed most likely to be what I was after.
I'll add UTF-8 to the install file.

Quoteeldʌka, can you please add the two chars below to the list that gets converted to 't' (so they'll be there in the next version)?

The chars are: ţ and Ţ
Sure!

QuoteIs the mod supposed to remove the Search Engine Friendly links option in features? Maybe I changed the wrong code manually because it's not there.
It is supposed to remove that option. If it's still there then it hasn't been installed properly.

QuoteBTW when I have Enable URL Filtering my forum stops loading whenever I try to go into a forum. Do I need this ticked to use Pretty URLS?
Did you check the Apache log?
"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."

viulian

A while ago I wrote my own Google Sitemap Generator (but was too lazy to polish it enough to share).
Anyway, can you please tell me if it's better if I regenerate the sitemap.xml on my domain using the new pretty urls, or should I let them be the standard smf style (as they are).

BTW, I also fixed my board names which were like b14, b16 etc.
What happened was that I always truncated the two tables pretty url creates when reinstalling the module, but did not touch the other two arrays (settings related to board names) in the {prefix}settings table.
So they never got computed again after being incorrectly computed (due to my mistakes) the first time. My mistake was that when saving Subs-PrettyUrls.php and index.php (to do the debugging) I did not save them with UTF-8. I realized the mistake back then and switched to proper encoding, but ignored the settings.

I'm telling this maybe you can put it in the documentation or something... :) so others won't make the same mistakes.

Thanks!

Advertisement: