Pretty URLs

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

Previous topic - Next topic

Dannii

"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."

argimiro

Icing on the cake for this mod would be something to automatically generate html sitemaps or maybe even xml sitemaps for google et al.

Dannii

No, that would be bloat. I have no plans for this mod to ever do anything other than manage URLs. The SMF sitemaps mod is compatible so use it if you want sitemaps.
"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."

argimiro

#1823
Great - thanks for the pointer. I'll try that :)

http://custom.simplemachines.org/mods/index.php?mod=755 - yes?

Dannii

"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."

argimiro

It seems to work well.. haven't figured out how to make Pretty URLs redirect the sitemap's query-based URLs in the sitemap mod (should it be able to?) - if not I guess I could just handball them in .htaccess

It'd be nice for instance to have /forums/sitemap.xml as opposed to /forums/index.php?action=sitemap;xml etc

Dannii

Hmm I'll consider adding a filter to the extras package for that.
"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."

argimiro

I can only see three forms of URL that are associated with that mod & I guess the mappings ought to be something like;


/forums/index.php?action=sitemap                   -->  /forums/sitemap.html
/forums/index.php?action=sitemap;start=[number]    -->  /forums/sitemap[number].html
/forums/index.php?action=sitemap;xml               -->  /forums/sitemap.xml


I'll have a crack with a few mod_rewrite rules, if you did do a filter that'd be pretty cool

5 hours ago I pretty much thought our board was sunk as far as moving to SMF 2.0 was concerned, your mod & suggestions have pretty much saved the day here. Massive two thumbs up.

Dannii

The first two should be changed by the actions filter already.
"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."

phpmycoder

Quote from: Dannii on June 03, 2008, 09:22:19 PM
Had you already done it? Cause that's just what I suggested (aside from editing the .htaccess file manually rather than the array.)

It won't impair any functionality, it will however have the same performance cost as with using the boards. You could edit the querys but I think it's not worth risking breaking it for what would be only a barely noticeable performance increase.

ha ha, i didn't even see your post in which you suggested the exact same changes ;) thanks anyway! the performance issue is probably dismal like you said. i'll keep it as is.

thanks again!
gigi

argimiro

Quote
The first two should be changed by the actions filter already.

funny, it didn't seem to 'kick in' at first, but something's happening now.

It seems to be handling the first format perfectly. Unsure about the second.. the third might be good if it could map directly to /sitemap.xml (I don't know if /sitemap/?start=0 will upset e.g. google)


/index.php?action=sitemap           -->  /sitemap/
/index.php?action=sitemap;start=0   -->  /sitemap/?start=0
/index.php?action=sitemap;xml       -->  /sitemap/?xml


The remapper from seo4smf to Pretty URLs format is working here flawlessly, right down to returning 301 codes for the old URLs and 200 codes for the Pretty URLs ones. That's a prayer answered. Was worried about losing all our old seo4smf listings.

Dannii

QuoteIt seems to be handling the first format perfectly. Unsure about the second.. the third might be good if it could map directly to /sitemap.xml (I don't know if /sitemap/?start=0 will upset e.g. google)
Ahh yep I've heard that Google needs the xml file to be in the root folder which would be important.

After 1.0 is released I'll investigate making all start numbers do something like /0/
"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."

MultiformeIngegno

Quote from: Dannii on June 03, 2008, 09:49:57 AM
QuoteWith PhpMyAdmin I changed the forum URL (there was a specific entry for the forum url) in smf_pretty_urls_cache.
Before it was rockciclopedia.com/forum now forum.rockciclopedia.com ...
Did you change everything else with repair_settings.php first?
Mmmh... no..
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Dannii

Well you'll need to get the rest of SMF working first. Then you can reinstall pretty URLs and fix the pretty_root_url setting.
"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."

MultiformeIngegno

Quote from: Dannii on June 04, 2008, 09:22:56 AM
Well you'll need to get the rest of SMF working first. Then you can reinstall pretty URLs and fix the pretty_root_url setting.
I've uploaded repair_settings.php and I've selected all the raccomended settings.
Then I've uninstalled Pretty URLs (removing the db data also) and I've reinstalled all...

The problem still remains... :(

If I disable Pretty URLs the login error disappear!
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Dannii

Are you still trying to move it to the sub domain?
"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."

MultiformeIngegno

Quote from: Dannii on June 04, 2008, 09:37:08 AM
Are you still trying to move it to the sub domain?
I've already moved my forum to the subdomain, you can see it here: http://forum.rockciclopedia.com

When I (and all the users) try login, they receive this error:
You were unable to login. Please check your cookie settings.

Seems you can't login but if you click on "back" lin you're logged in already...
Strange!

And, as I wrote, qhen the error is displayed the URL is this:
/profile/?pretty;action=login2&sa=check
It seems the check of the url is wrong but the user is logged in anyway...
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Dannii

Are the subdomain settings correct etc?
"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."

MultiformeIngegno

Quote from: Dannii on June 04, 2008, 09:44:40 AM
Are the subdomain settings correct etc?
Yes!
They are all setted as raccommanded:

RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Dannii

Does it work if you have URL rewriting on but turn off the actions filter?

I'll have to look into this after exams, I don't have the time now sorry.
"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."

Advertisement: