News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Pretty URLs

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

Previous topic - Next topic

glennk

All is working now I think.

A few slight problems you may wish to know about.

A similar problem to when we installed 0.4 is that in any board containing a ' sign

eg Ramrod's Pictures

I get a page not found error from the browser and the url looks like this :

http://www.whitbyseaanglers.co.uk/forum/ramrod%5C's-pictures-b18/0/

Another thin is

that urls that once looked like this :

http://www.whitbyseaanglers.co.uk/forum/north-east-coast-fishing/pollock-fishing/0/

Now look like this

http://www.whitbyseaanglers.co.uk/forum/north-east-coast-fishing-b2/pollock-fishing/0/

Not quite sure why the b2 bit is there ? Is this an error. Again could cause duplicate content problems for google ending in supplemental results.

This quick reply box needs some smilies.

Thanks again - Glenn

glennk

Sorry just 1 more question for piece of mind( I bet your sick of me).

I still have this in the forum .htaccess - Is it required still ?
Does it need anything adding or changing to work with this version ?

#   Pretty URLs mod
#   http://code.google.com/p/prettyurls/
#   .htaccess file generated automatically on: June 18, 2007, 13:20

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

jinji

Which is better for search engines? Pretty URLs or SEO4SMF?
Why dosen't the profile mod? It shows me blank pages.

Dannii

Quote from: glennk on June 18, 2007, 11:43:30 AM
A similar problem to when we installed 0.4 is that in any board containing a ' sign
eg Ramrod's Pictures
I get a page not found error from the browser and the url looks like this :
http://www.whitbyseaanglers.co.uk/forum/ramrod%5C's-pictures-b18/0/

Another thin is that urls that once looked like this :
http://www.whitbyseaanglers.co.uk/forum/north-east-coast-fishing/pollock-fishing/0/
Now look like this
http://www.whitbyseaanglers.co.uk/forum/north-east-coast-fishing-b2/pollock-fishing/0/
Not quite sure why the b2 bit is there ? Is this an error. Again could cause duplicate content problems for google ending in supplemental results.
Hmm. Try uninstalling the mod, and ask Nick to delete everything the mod added to the database. There are a few tables, and some rows in the smf_settings table. Reinstall it. You'll be starting completely fresh, which should hopefully remove those -b2s.

Quote from: glennk on June 18, 2007, 11:47:41 AMI still have this in the forum .htaccess - Is it required still ?
Does it need anything adding or changing to work with this version ?
It's required yes, but no you don't have to do anything, the mod creates it automatically.

Quote from: jinji on June 18, 2007, 06:49:48 PMWhich is better for search engines? Pretty URLs or SEO4SMF?
SEO4SMF always has the topic numbers in the URLs, whereas mine only has the numbers for topics with the same title. I think that's better :)

QuoteWhy dosen't the profile mod? It shows me blank pages.
What shows blank pages? The profiles package?
"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."

metallica48423

QuoteSEO4SMF always has the topic numbers in the URLs, whereas mine only has the numbers for topics with the same title. I think that's better

Depends on how somone views the idea of having an additional sql query done :P

Its a matter of taste :)
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Dannii

#425
QuotePage created in 0.081 seconds with 21 queries. (Pretty URLs adds 0.007s, 1q)
Seems pretty reasonable to me ;) The queries are all very simple, and the load time increase is pretty small (not all of it is my mod either).

I'd be interested to find out from everyone how big their smf_pretty_topic_cache tables are. Mine are pretty big, more than everything else combined :o
"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."

glennk

Hi Eldaka,

Just a quick update.

Nick got rid of the b2 bit in the urls for me. Which is great. Also some good news is that the first pages indexed by google under the 0.7 update have gone into the google main index and not supplemental so I think the 301 from the numbered url to the pretty url has fixed that. I would be interested on your views on that on.

The only bad news is goggle indexed a lot of urls with the b2 bit in the url and the topics appear to still exist. so now we have

http://www.whitbyseaanglers.co.uk/forum/north-east-coast-fishing-b2/amble-boat-fishing-match/0/

and

http://www.whitbyseaanglers.co.uk/forum/north-east-coast-fishing/amble-boat-fishing-match/0/

Duplicate content again. Is there any code that can be put in the .htaccess that will rewrite all urls with a board number in the url to one without the board number. Ie 301 rewrite the b2 urls

Thanks again (big smiley face)

Dannii

Hmmm, I'll think about what could be done.
"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."

glennk

Good man (bigger smiling smiley)

Dannii

Okay I think this will work.
Display.php
Code (find) Select
// 301 redirects
if (isset($context['pretty']['oldschoolquery']) && $modSettings['pretty_enable_filters'])

Code (replace) Select
// 301 redirects
if ((isset($context['pretty']['oldschoolquery']) || $_REQUEST['board'] != $context['pretty']['board_urls'][$board]) && $modSettings['pretty_enable_filters'])
"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."

Goad

Quote from: eldʌkaː on June 14, 2007, 12:35:40 AM
Quote from: Goad on June 13, 2007, 01:45:46 PM0.7 fixed this issue....now im getting the 404 error on all pretty urls.
Can you post your .htaccess

sorry I'm lagging on this...i didnt know there was replys.....my email notifications arent working...

heres my .htaccess:

# Pretty URLs mod
# http://code.google.com/p/prettyurls/
# .htaccess file generated automatically on: June 13, 2007, 13:41

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

Dannii

That .htaccess file looks fine.
Is mod_rewrite enabled? Can you post a link to a phpinfo.php file.
"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."

Goad

Quote from: eldʌkaː on June 23, 2007, 04:34:56 AM
That .htaccess file looks fine.
Is mod_rewrite enabled? Can you post a link to a phpinfo.php file.

http://test.socaljetboats.com/phpinfo.php

how do i tell if mod_rewrite is enabled? my host is 1and1. i am going to drop them soon and get a VM. I am sick of running into roadblocks like this.

Dannii

From what I can tell, your server doesn't have mod_rewrite. I don't know much about 1and1 or VMs, but hopefully your next server will be more useful.
"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."

Col

Hi Eldeka,

I'm having some intractable problems with my forum so I'm having to slowly add modifications to a test forum to find the fault. However, I cannot successfully install this mod (0.7) to an unmodified 1.1.2 or upgraded 1.1.3 forum. It appears to install, but the filters option in Features and Options doesn't appear, and the Search Engine Friendly URLs option is removed (is that right)? That option still appears in my version on my real forum, but I've not upgraded from 0.4 yet.

Thanks.

Sakae

Works fine for me and my 1.1.3 SMF forum... Great job!!
http://www.tigrelog.com.br
l: simple p: machines

Dannii

Col, are you using a custom theme? SMF's normal SEF URLs option should be removed, but the new settings should be added in its place.
"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."

Green CoW

I got "SMF Arcade 2.0.7" installed and today I installed "Pretty URLs - Base 0.7" and somehow the pretty URLs is causing problems for the Arcade!
I get
You need to enable javascript in order to play games. when I'm trying to access the Arcade!
When I uninstalled the "Pretty URLs - Base 0.7" I could play again!
Any ideas what's causing the problem?
hxxp:www.greencow.se [nonactive]

Flying Drupalist

Pretty URLs are interfering with some of my other functions and I've found them to be unnecessary. I uninstalled pretty urls but it doesn't go away... 0.o

Dannii

Green CoW, anything in the error log? I don't see how it could possibly conflict with javascript.

Miraploy, if it's still happening then the code must still remain in QueryString.php and wasn't uninstalled properly.
"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: