Simple Machines Community Forum

SMF Support => Server Performance and Configuration => Topic started by: MrLeN on January 02, 2007, 09:46:33 AM

Title: Search Engine Friendly URL's
Post by: MrLeN on January 02, 2007, 09:46:33 AM
Hello, when I turn on the search engine friendly URL's the forum still displays non search engine friendly URL's. I am looking for some direction in what I can do to rectify this.

Title: Re: Search Engine Friendly URL's
Post by: 青山 素子 on January 03, 2007, 02:05:56 AM
Click the help button by the setting to see if your server setup supports using this type of URL.
Title: Re: Search Engine Friendly URL's
Post by: MrLeN on January 03, 2007, 02:15:26 AM
DOH! It says this feature will not work on your server? Stuf that! I want it to work.. contacting host..

Thanks for your help!

.. oh, what do I ask of my host?

Len
Title: Re: Search Engine Friendly URL's
Post by: 青山 素子 on January 03, 2007, 03:07:38 AM
Either PHP needs to run as an Apache module, or you need cgi.fix_pathinfo to be enabled (if they are running PHP as a CGI).
Title: Re: Search Engine Friendly URL's
Post by: MrLeN on January 03, 2007, 03:40:53 AM
Thanks heaps!

I will email now and ask them about that.

Title: Re: Search Engine Friendly URL's
Post by: Webby on January 03, 2007, 03:48:14 AM
My server supports this (at least, this is what it says when I hit the HELP button ;)), but the URL's still contain the "?" and look like index.php?action=....... instead of index.php/topic,1.html and so on. What could be the reason for this ?
Title: Re: Search Engine Friendly URL's
Post by: MrLeN on January 03, 2007, 08:33:53 AM
Ok, so I contacted my web host and they told me that I can put a php.ini with custom options into each folder that executes php. They uploaded an example php.ini file for me. However, I don't know which folders I should upload the php.ini file to and I also don't know what settings to put in there. I know I am starting to ask alot now -- but is there any chance one of you guys can at least point me in the right direction?

Title: Re: Search Engine Friendly URL's
Post by: 青山 素子 on January 03, 2007, 11:41:20 AM
Webby, the "friendly" URLs only work for board posts. Anything else uses normal query URLs.


MrLeN, you need to check with your host for where the php.ini should be placed, although if they uploaded it for you, that should be the correct place. Search the file for "cgi.fix_pathinfo" and see if it is found. If it is, change it from 0 to 1. If it isn't, go to the top of the file and add tis line under the line with "[PHP]":


cgi.fix_pathinfo=1
[/code.]
Title: Re: Search Engine Friendly URL's
Post by: MrLeN on January 03, 2007, 11:47:10 AM
They only uploaded it for me to use. They said I have to place it in every area where the script is executed. They did not upload it so that it would work. They only uploaded it so that there is a php.ini file for me to use -- but I don't know which folders execute php.

The line says:

;cgi.fix_pathinfo= 0

It seems to be commended out.
Title: Re: Search Engine Friendly URL's
Post by: 青山 素子 on January 03, 2007, 12:01:22 PM
Put a phpinfo script in your SMF directory. When you view it, it will say where it is looking for php.ini. (What is phpinfo.php? (http://www.simplemachines.org/community/index.php?topic=18250.0))

Uncomment the line and change the 0 to a 1.
Title: Re: Search Engine Friendly URL's
Post by: MrLeN on January 03, 2007, 12:08:04 PM
http://www.goingsolar.info/forums/phpinfo.php

I changed it to 1 and uncommented it and uploaded it to /forums

I check to see if it has search engine dfriendly url's -- still not.
Title: Re: Search Engine Friendly URL's
Post by: 青山 素子 on January 03, 2007, 12:19:36 PM
I think it might be because it is running with FastCGI. Everything looks good, you'll have to check with your host on this one.
Title: Re: Search Engine Friendly URL's
Post by: MrLeN on January 03, 2007, 12:29:33 PM
I already checked with my host. They told me to upload that php.ini file.

Moral of the story is: My host sucks.

Moving..
Title: Re: Search Engine Friendly URL's
Post by: Webby on January 03, 2007, 03:39:54 PM
Quote from: Motoko-chan on January 03, 2007, 11:41:20 AM
Webby, the "friendly" URLs only work for board posts. Anything else uses normal query URLs.

If I try that, it shows me :

Quote
.........forum/index.php?topic=2.msg3#msg3

So maybe it just doesn't work for me ? It says it works when I test it, but....
Title: Re: Search Engine Friendly URL's
Post by: 青山 素子 on January 03, 2007, 06:31:16 PM
Webby, can you link to your forum?
Title: Re: Search Engine Friendly URL's
Post by: Webby on January 04, 2007, 03:56:21 AM
Yes : klik on the (http://www.simplemachines.org/community/Themes/newsite/images/www_sm.gif) (http://www.marcovanveelen.nl/forum)  :D
Title: Re: Search Engine Friendly URL's
Post by: 青山 素子 on January 04, 2007, 10:38:05 AM
Quote from: Webby on January 04, 2007, 03:56:21 AM
Yes : klik on the (http://www.simplemachines.org/community/Themes/newsite/images/www_sm.gif) (http://www.marcovanveelen.nl/forum)  :D

Silly me.....

The forum is embedded in MKPortal, this might be preventing the "friendly" URLs from working.
Title: Re: Search Engine Friendly URL's
Post by: taxiken on January 04, 2007, 05:04:50 PM
My "Search Engine Friendly URL's" worked perfectly until I upgraded to SMF 1.1.1. Since the upgrade, the help box tells me "This feature will not work on your server."
Title: Re: Search Engine Friendly URL's
Post by: 青山 素子 on January 04, 2007, 07:47:11 PM
Quote from: taxiken on January 04, 2007, 05:04:50 PM
My "Search Engine Friendly URL's" worked perfectly until I upgraded to SMF 1.1.1. Since the upgrade, the help box tells me "This feature will not work on your server."

Did you make any changes to get them working on an older version? I know there were a few tweaks posted to try and get them working.
Title: Re: Search Engine Friendly URL's
Post by: taxiken on January 05, 2007, 02:27:27 PM
Ah ha! (*Light bulb turns on above head*). Yes, Motoko-chan, I did tweak some code to make it work in an earlier version. Now if I can just figure out exactly what I did, I can change it back!
Title: Re: Search Engine Friendly URL's
Post by: taxiken on January 05, 2007, 02:44:48 PM
I found it! The "Search Engine Friendly URL's" feature now works on my server. I changed this line in Sources/QueryString.php

if (!empty($modSettings['queryless_urls']) && (!$context['server']['is_cgi'] || @ini_get('cgi.fix_pathinfo') == 1) && $context['server']['is_apache'])
to
if (!empty($modSettings['queryless_urls']))

and eveything works perfectly again in SMF 1.1.1. Thank you!
Title: Re: Search Engine Friendly URL's
Post by: 青山 素子 on January 05, 2007, 02:54:51 PM
Glad you got it worked out.
Title: Re: Search Engine Friendly URL's
Post by: Zeke on January 11, 2007, 02:58:41 PM
Quote from: taxiken on January 05, 2007, 02:44:48 PM
I found it! The "Search Engine Friendly URL's" feature now works on my server. I changed this line in Sources/QueryString.php

if (!empty($modSettings['queryless_urls']) && (!$context['server']['is_cgi'] || @ini_get('cgi.fix_pathinfo') == 1) && $context['server']['is_apache'])
to
if (!empty($modSettings['queryless_urls']))

and eveything works perfectly again in SMF 1.1.1. Thank you!

FOR THE LOVE OF GOD THANK YOU!!!!!

I've been trying to get my board SEO / SEF for about 2 weeks now pouring over all the examples in this forum to no avail, but that change fixed it!

My configuration:

Hosted on SiteGround, SMF 1.1.1, PHP version     5.0.5, Apache version     1.3.37 (Unix), Server API    CGI, Mod_Rewrite installed, php.ini's allowed


I had tested mod_rewrite with this (http://www.wallpaperama.com/forums/how-to-test-check-if-mod-rewrite-is-enabled-t40.html).

I had tried adding custom php.ini redirect fix...
Title: Re: Search Engine Friendly URL's
Post by: gaja on June 14, 2007, 11:33:34 AM
It seems like I am having the same problem, I have tried editing php.ini file and nothing changed for the url. Editing QueryString.php didn't help either.

Site is hosted on godaddy.com
Here is some of my phpinfo:
System: Linux
Server API:  CGI/FastCGI

It is also because FastCGI that my seo friendly url function is not working?
If so, what should I ask the hosting company about the FastCGI then?

Thanks a lot for your help!


Quote from: Motoko-chan on January 03, 2007, 12:19:36 PM
I think it might be because it is running with FastCGI. Everything looks good, you'll have to check with your host on this one.
Title: Re: Search Engine Friendly URL's
Post by: snowweb on March 30, 2008, 05:42:03 AM
Quote from: taxiken on January 05, 2007, 02:44:48 PM
I found it! The "Search Engine Friendly URL's" feature now works on my server. I changed this line in Sources/QueryString.php

if (!empty($modSettings['queryless_urls']) && (!$context['server']['is_cgi'] || @ini_get('cgi.fix_pathinfo') == 1) && $context['server']['is_apache'])
to
if (!empty($modSettings['queryless_urls']))

and eveything works perfectly again in SMF 1.1.1. Thank you!

Thanks buddy... fixed it for me too :)
Title: Re: Search Engine Friendly URL's
Post by: Huttan on March 30, 2008, 02:27:19 PM
How does a SEF friendly site looks as?
Title: Re: Search Engine Friendly URL's
Post by: vbgamer45 on March 30, 2008, 02:32:23 PM
Something like this
http://www.smfhacks.com/index.php/topic,2220.msg10882/topicseen.html#new

Basiclly gets rid of the = and the ? and adds html extension
Title: Re: Search Engine Friendly URL's
Post by: Huttan on March 30, 2008, 03:18:51 PM
Then I must have the bug.
I wonder if I fix this can something else get problem
Title: Re: Search Engine Friendly URL's
Post by: Huttan on March 30, 2008, 09:32:58 PM
It dide't worked for me, i have SMF 1.1.4. My site shutdown and it's unreachable