Search Engine Friendly URL's

Started by MrLeN, January 02, 2007, 09:46:33 AM

Previous topic - Next topic

MrLeN

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.


青山 素子

Click the help button by the setting to see if your server setup supports using this type of URL.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


MrLeN

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

青山 素子

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).
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


MrLeN

Thanks heaps!

I will email now and ask them about that.


Webby

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 ?

MrLeN

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?


青山 素子

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.]
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


MrLeN

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.

青山 素子

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

Uncomment the line and change the 0 to a 1.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


MrLeN

#10
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.

青山 素子

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.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


MrLeN

I already checked with my host. They told me to upload that php.ini file.

Moral of the story is: My host sucks.

Moving..

Webby

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

青山 素子

Webby, can you link to your forum?
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Webby


青山 素子

Quote from: Webby on January 04, 2007, 03:56:21 AM
Yes : klik on the   :D

Silly me.....

The forum is embedded in MKPortal, this might be preventing the "friendly" URLs from working.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


taxiken

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

青山 素子

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.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


taxiken

#19
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!

taxiken

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!

青山 素子

Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Zeke

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 hxxp:www.wallpaperama.com/forums/how-to-test-check-if-mod-rewrite-is-enabled-t40.html [nonactive].

I had tried adding custom php.ini redirect fix...

gaja

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 hxxp:godaddy.com [nonactive]
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.

snowweb

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 :)

Huttan

How does a SEF friendly site looks as?

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Huttan

Then I must have the bug.
I wonder if I fix this can something else get problem

Huttan

It dide't worked for me, i have SMF 1.1.4. My site shutdown and it's unreachable

Advertisement: