Pretty URLs

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

Previous topic - Next topic

rel`s

Hello,
I've done a research to find how to fix my error but I've not found.
When I try to access index.php?action=admin;area=pretty
I've a Fatal Error :
Fatal error: (null)() [function.require]: Failed opening required '/home/mywebsite/forum/Sources/PrettyUrls.english.php' (include_path='.:/usr/local/lib/php') in /home/mywebsite/forum/Sources/Load.php(1726) : eval()'d code on line 4

I don't understand because I've just install it and I can't touch parameters.

Thanks for your Help !

P.S. : Sorry for my bad english (I'm French people)

Silvan

First of all, great mod! Thanks a lot! Works brilliant :)

But i have one question.... is het possible that i change this url:

hxxp:www.mydomain.com/games/arcade/?sa=play;game=409 [nonactive]

to

hxxp:www.mydomain.com/games/arcade/game-name-here [nonactive]

If so, how can i do that using Pretty Urls, or can i adjust it easily in the .htaccess?
I hope someone can answer my question, it will help me a lot!

Thanks in advance.

Chadrew

#2782
I am getting a blank page for some forum sections. Error log has the following errors:
Database Error: Duplicate entry 'topic-title' for key 2
File: /var/www/html/#####/forumas/Sources/PrettyUrls-Filters.php
Line: 274

Please help :)

Edit: upon further inspection, this seems to have been caused by a single quote in the topic title - like this one '. Yep, a single quote kills the forum  >:(

DRAG00N

Hi,

I've installed Pretty URLs 0.9 on my production site (SMF 1.1.7), and it works well.
Now, i need a local installation of SMF, but when i import datas, all the forum url leads to the online site. :(
I used 'repair-settings.php' and other stuffs to change paths, but it doesn't work. It's like if the (pretty) urls are hard-coded.

So, how can i disable the Pretty URLs mod or change all paths on my local installation ?

Note : I cannot go to my admin panel and deactivate the mod because the login form leads to the production site.

mark7144

I've just discovered that the 'smf_pretty_urls_cache' is really large on my database in comparison to the other tables...

1) Is this normal?
2) Can I delete the table without consequences?
3) Can can I keep it under control?

SlammedDime

1 - yes
2 - no, deleting the table will probably cause your site to crash
3 - you can truncate it if you like, but it will cause more queries on your forum as the cache builds back up.  The purpose of the cache is to reduce database queries, and as long as the table is indexed properly and the queries to call on the cache table are built right, it doesn't matter how large it is, it should still be efficient.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Chadrew

#2786
I've deleted it before. The forum didn't crash, however deleting the cache is pointless since it will just have to be repopulated again. Besides, the load on your server will be higher until all the forum URLs are cached once more.

It's true that it gets huge though  ::) I usually leave it out when making DB backups or moving the forum.

Atheo

#2787
SMF 2 beta 4

This mod does rewrites to the htaccess file, apparently, and caused another installation in a subdomain to show 404 errors and not load. The fix, for me, was to uninstall the mod, which didn't do anything until I deleted everything associated with prettyurls from the htacces. NOW, when I load my main site, it takes me to the forum instead of the home page created by PortaMX.  Whats the fix for this?

**EDIT: Nevermind. Re-Edit htaccess with DirectoryIndex index.php

Thank you.

mark7144

Quote from: SlammedDime on December 14, 2008, 04:15:39 PM
1 - yes
2 - no, deleting the table will probably cause your site to crash
3 - you can truncate it if you like, but it will cause more queries on your forum as the cache builds back up.  The purpose of the cache is to reduce database queries, and as long as the table is indexed properly and the queries to call on the cache table are built right, it doesn't matter how large it is, it should still be efficient.
Thanks :)

sgilleland

I installed pretty URL's and I had to manually make changes to manageboards.php because it failed on installation...it is the only that failed. 

I enabled it and it appeared to work, but now I can't go anywhere but the initial page, which is index.php.  It keeps giving me error 404 page not found.  Does this have to do with the htaccess?  If so, where do I find it, and how do I fix it?  Thanks in advance for your help.

sgilleland

Found my .htaccess it is in my /BDG folder which is where the entire forum resides.  Should it be somewhere else?  Also, I am posting the code for it.


# Pretty URLs mod
# http://code.google.com/p/prettyurls/
# .htaccess file generated automatically on: December 16, 2008, 19:26

RewriteEngine on

# Rules for: tp-articles
RewriteRule ^page/([^/]+)/?$ ./index.php?pretty;page=$1 [L,QSA]

# Rules for: actions
RewriteRule ^(activate|admin|announce|ban|boardrecount|buddy|buddies|calendar)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(cleanperms|collapse|convertentities|convertutf8|coppa|deletemsg|detailedversion|display)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(dlattach|dumpdb|editpoll|editpoll2|featuresettings|featuresettings2|findmember|form)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(help|gallery|helpadmin|im|invite|jsoption|jsmodify|treasury)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(links|treasury|lock|lockVoting|login|login2|logout|maintain)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(manageattachments|manageboards|managecalendar|managesearch|markasread|membergroups|googlemap|mergetopics)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(mlist|modifycat|modifykarma|modlog|movetopic|movetopic2|news|notify)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(notifyboard|optimizetables|packageget|packages|permissions|pgdownload|pm|post)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(treasuryadmin|treasuryadmin|post2|postsettings|printpage|profile|profile2|quotefast)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(quickmod|quickmod2|recent|regcenter|register|register2|reminder|removetopic2)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(removeoldtopics2|removepoll|repairboards|reporttm|reports|requestmembers|search|search2)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(sendtopic|serversettings|serversettings2|smileys|smstats|spellcheck|splittopics|stats)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(sticky|theme|trackip|admod|about:mozilla|about:unknown|unread|unreadreplies)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(viewErrorLog|viewmembers|viewprofile|verificationcode|vote|viewquery|who|\.kml)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(\.xml|tpadmin|forum|tpmod)/?$ ./index.php?pretty;action=$1 [L,QSA]

# 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]

brianjw

The .htaccess for this mod should be in the root of your forum. SO if your forum is in /BDG (which is what you're saying), then yes the .htaccess should be there.

sgilleland

#2792
this is where it is at, any ideas why I would be getting the error 404 page not found?  When I turn on Pretty URL, it changes my urls the way it is suppose to but will not show the page.

Anyone have any ideas????



glennk

Hi Danii,

Could you spare a few moments to help me out please.

How do I redirect

/forum/north-east-coast-fishing/0/

to

/forum/north-east-coast-fishing/

I have tried adding standard 301 redirect code to the htaccess but it does not work.

mark7144

#2794
Sorry to bring this up again but I'm shocked at the size of my cache table and I want to be certain it is normal. Can someone explain why it is not much smaller than my messages table? That doesn't make any sense to me.

smf_messages    195.83 MB
smf_pretty_urls_cache 101.23 MB

If the above really is normal, then I strongly recommend that the author considers a way to prevent the cache getting so big. Maybe have it so it only caches URLs from the last X days.

superman1232

I just installed the mod, installation went smoothly. I have no idea how to make a robots.txt. Can anyone help me out (someone who is using pretty urls on their forum and have a seo robots.txt)? Thanks.

Zeebra

Well that was interesting.  I guess I should have read instructions before jumping headlong into this.  I installed it, turned it on, and then nothing worked.  I couldn't get to my forum, my urls were "pretty" but they would redirect to a "not found" page.  I couldn't even go in as admin to uninstall the mod cause it would try to re-direct to the pretty url.

Maybe the pretty url mod shouldn't change the Admin links?  In case of issues it would be good to have the links for the admin pages stay the same without the pretty formatting.  After all, only admins see these links.

I had to manually go in and overwrite a bunch of PHP files from before I installed the pretty mod to get my forum back up and working.  What a pain.

glennk

Whats happened to Danni ? I notice he hasnt posted in a good while. Hope he is ok ??

brianjw

Quote from: sgilleland on December 16, 2008, 11:13:00 PM
this is where it is at, any ideas why I would be getting the error 404 page not found?  When I turn on Pretty URL, it changes my urls the way it is suppose to but will not show the page.

Anyone have any ideas????
Does your host allow mod_rewrite? Ask them if you don't know. Until then, you may want to try read this guide as well which could solve this problem: http://code.google.com/p/prettyurls/wiki/TroubleShooting

Quote from: superman1232 on December 18, 2008, 06:03:17 AM
I just installed the mod, installation went smoothly. I have no idea how to make a robots.txt. Can anyone help me out (someone who is using pretty urls on their forum and have a seo robots.txt)? Thanks.
robots.txt doesn't really have anything to do with the mod. To learn about robots.txt go here.

Quote from: Zeebra on December 18, 2008, 11:12:11 AM
Well that was interesting.  I guess I should have read instructions before jumping headlong into this.  I installed it, turned it on, and then nothing worked.  I couldn't get to my forum, my urls were "pretty" but they would redirect to a "not found" page.  I couldn't even go in as admin to uninstall the mod cause it would try to re-direct to the pretty url.

Maybe the pretty url mod shouldn't change the Admin links?  In case of issues it would be good to have the links for the admin pages stay the same without the pretty formatting.  After all, only admins see these links.

I had to manually go in and overwrite a bunch of PHP files from before I installed the pretty mod to get my forum back up and working.  What a pain.
You could've also read this guide before doing it the hard way: http://code.google.com/p/prettyurls/wiki/TroubleShooting ;)

Quote from: glennk on December 18, 2008, 07:39:19 PM
Whats happened to Danni ? I notice he hasnt posted in a good while. Hope he is ok ??
Not sure, he hasn't been on since November something.

sgilleland

my host 1and1.com supports mod rewrite....so they say, but I have the same problem with error 404....I posted my .htaccess contents a few posts back.  The .htaccess file is in my /bdg folder where my index.php is and the entire forum, but still not working.  I am sure it is something simple, but can't figure it out.  I did get the forum back online with the old urls, but would really like to utilize pretty urls.

Any suggestions would be greatly appreciated


Advertisement: