News:

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

Main Menu

Search friendly URLs

Started by wgm, July 20, 2005, 07:53:31 AM

Previous topic - Next topic

wgm

How would I go about (see below) changing URL from one to another.

Current:
http://www.wnwest.com/forum/index.php/board,13.0.html
Change to:
http://www.wnwest.com/forum/board,13.0.html

I did see a topic on this, but I am totally lost.
Thanks.

Fizzy

Search is your friend.  :)

<admin> / <Edit Features and Options> / <Search engine friendly URLs (Apache only!) >

"Reality is merely an illusion, albeit a very persistent one." - A.E.


wgm

Quote from: Fizzy on July 20, 2005, 08:18:54 AM
Search is your friend.  :)

<admin> / <Edit Features and Options> / <Search engine friendly URLs (Apache only!) >



Already that, see first code block. :P

Chris Cromer

Fizzy, he isn't trying to enable that feature, he wants the feature to work differently.
Chris Cromer

"I was here, here I was, was I here, sure I was" - The little voice in my head.

Fizzy

#4
Sorry guys,

I missed that, I was going more by the thread title. My mistake.  >:(

Out of interest though, what would be the relevance of dropping the index.php portion of the URL?
"Reality is merely an illusion, albeit a very persistent one." - A.E.


[Unknown]

You'll need to use mod_rewrite... I'd search for it, since I know this has been posted previously.

-[Unknown]

wgm

Quote from: [Unknown] on July 20, 2005, 06:02:58 PM
You'll need to use mod_rewrite... I'd search for it, since I know this has been posted previously.

-[Unknown]

Sorry for the response delay, I did look at a topic I believe on page 2 or 3 here, about mod_rewrite, thats why I am lost.

[Unknown]

You'd want to change this:

$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+)(#[^"]*)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);

To this:

$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+)(#[^"]*)?"/e', "'\"' . dirname(\$scripturl) . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);

In QueryString.php.  How do I modify files?  Then, in your .htaccess:

RewriteEngine On
RewriteRule ^(board.*)$ index.php/$1
RewriteRule ^(topic*)$ index.php/$1

-[Unknown]

wgm

Dang I must be getting old, forgot about this topic.

Thank you [Unknown].


Ivan Minic

Is it possible to change it to show topic title after topic number since it is no1 thing in seo..
For example:
http://forum.burek.co.yu/index.php/topic,39897.0.html
=
http://forum.burek.co.yu/index.php/Title-Here-Blah-Blah-Blah/topic,39897.0.html

or something like that?

I did search for it, found some topics but not a piece of code to do it.

Fizzy

That sounds very interesting Ivan,

I would be keen to hear a response on this one too
"Reality is merely an illusion, albeit a very persistent one." - A.E.


Ivan Minic

That would improve your rankings... Se for your self Google Ranking Factors - SEO List

Thunderace

On this note I'd like to add that I was in search of SEO

I had mambo at the time, I added all sorts of supposed SEO extras (some of them paid for) what was found by the search engines .. yup .. SMF posts .. the only thing I didn't spend money on.

Sure use search engine friendly links in SMF guys .. but realise that the search engines (some of them at least) have moved on.

SMF is crawlable I guarantee it by testing.

Ivan Minic

It will crawl, the point is to get the most of it ;)

Advertisement: