This thread is a discussion for the wiki article: Workaround for Forced Query Strings
   
 
Workaround for Forced Query Strings
Posted: 04 June 2008 05:27 AM   [ Ignore ]  
Summer Student
Total Posts:  9
Joined  02-02-2008

I was having trouble with my NAVIGATION (I just put that in bold as I searched this Wiki for “navigation” and it came up with nothing helpful, so hopefully this entry might help others in the future) when installing EE.

First of all, my host is GoDaddy.com and during a re-installation I ran the Install Wizard and it stated that everything was fine and supported EXCEPT “url segment support”. GoDaddy.com’s tech support had not heard this term used before and therefore could not help me with the issue.

After some more research, I found that this info on the EE site about “Force URL query strings” located here: (http://expressionengine.com/docs/cp/admin/system_preferences/output_and_debugging_preferences.html):

Setting this to “Yes” will force the system to use a standard query string in all your URLs like this:

http://www.example.com/index.php?/blog/joe/ (notice the question mark).

When set to “No”, the system uses a more search-engine friendly format similar to:

http://www.example.com/index.php/blog/joe/

The majority of servers will be able to use the default (“No”) method, which is almost universally preferred by users. Some Windows servers (and very occasionally other types) do not support this feature and will have to be set to “Yes”. You’ll know if this affects you if none of your links seem to work.

In addition, some people will need to use this variable in conjunction with editing the $qtype variable in your main site index.php file.


I had to change the setting to “Yes” and set the $qtype variable in the index.php file to “2” and now the default EE template is navigable. YAY!

I just thought I’d let you know this in case you or someone else has this come up in the future.

Otherwise, Im loving EE. Thanks! grin

Profile
 
 
Posted: 04 June 2008 05:33 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15368
Joined  05-15-2004
elegantmachines - 04 June 2008 05:27 AM

Setting this to “Yes” will force the system to use a standard query string in all your URLs like this:

http://www.example.com/index.php?/blog/joe/ (notice the question mark).

When set to “No”, the system uses a more search-engine friendly format similar to:

http://www.example.com/index.php/blog/joe/

This has got nothing to do with search-engine friendlyness. You might cite aesthetic reasons, but search engines don’t care about the question mark as such.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 04 June 2008 05:40 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  9
Joined  02-02-2008
Ingmar Greil - 04 June 2008 05:33 AM
elegantmachines - 04 June 2008 05:27 AM

Setting this to “Yes” will force the system to use a standard query string in all your URLs like this:

http://www.example.com/index.php?/blog/joe/ (notice the question mark).

When set to “No”, the system uses a more search-engine friendly format similar to:

http://www.example.com/index.php/blog/joe/

This has got nothing to do with search-engine friendlyness. You might cite aesthetic reasons, but search engines don’t care about the question mark as such.

Hi Ingmar,

Actually I was wondering if someone came to the EE website and performed a search here for “navigation” issues (using navigation in their search term(s)) would my post show up in their search results?

I just wanted to make it easier for someone to get help with the same issue in the future.

Thanks for the quick reply!

Jason

Profile
 
 
Posted: 04 June 2008 05:47 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15368
Joined  05-15-2004

Yes, this is a forum entry like any other, and consequently will be found when searching the forums.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 04 June 2008 06:33 AM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15826
Joined  06-03-2002

So Jason does the posted workaround in this wiki article not work for you on GoDaddy?  Are you on a Windows server with them or Unix?

 Signature 
Profile
MSG
 
 
Posted: 04 June 2008 07:20 AM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  9
Joined  02-02-2008
Derek Jones - 04 June 2008 06:33 AM

So Jason does the posted workaround in this wiki article not work for you on GoDaddy?  Are you on a Windows server with them or Unix?

Hi Derek,

Yes, it did work and I’m on a Linux server with them.

I’m glad I just started receiving your EE RSS feed as I saw that I could make comments on Wiki articles, so I thought I would take the opportunity to post a reply to the Wiki post about this incident so that it would help some I the future with the same issue.

Best Regards,
Jason

Profile
 
 
Posted: 18 June 2008 12:14 PM   [ Ignore ]   [ # 6 ]  
Summer Student
Total Posts:  2
Joined  06-18-2008

I’m on GoDaddy as well… Deluxe hosting, Linux… And I have tried every single thing to try and get the workaround for forcing the URL query strings to work and have not been successful. So frustrating.

Anyone with any insight, please help…. maybe step-by-step would be awesome… Since making ‘php.ini’ files and creating .htaccess files are something I can do… but need to know exactly what should be included and where the files need to be placed.

Thanks.

Profile
 
 
Posted: 30 June 2008 02:09 PM   [ Ignore ]   [ # 7 ]  
Lab Assistant
RankRank
Total Posts:  189
Joined  07-07-2006

Jason -

Just wanted to chime in and say “thank you” for your post. It did help me resolve the same problem for a client who would like to run his EE powered site on GoDaddy servers.

After having all the links fail after uploading EE, I turned to these forums and typed in GoDaddy in the search bar. Found this string. The fix was easier than I anticipated.

For notoryious, you may not need to make any changes to the .htaccess or ini.php files, at least not for sites hosted on GoDaddy servers. Try the method described in the EE User Guide first, the one also described in this forum thread:

Go to Admin => System Preferences => Output and Debugging Preferences and set the “Force URL query strings” to Yes.

If that does not work, use an ftp program to alter the $qtype command located near the top of the index.php file in your main site folder. It is most likely set at “0.” Change it to “2” and all the links in your template should work fine.

Thanks all!

Profile
 
 
Posted: 22 August 2008 11:58 AM   [ Ignore ]   [ # 8 ]  
Summer Student
Total Posts:  3
Joined  08-12-2008

Just in case this helps someone else:

It appears that the ORIG_PATH_INFO workaround does the job on UnitedHosting shared hosting smile  I’m glad to say…

Profile
 
 
Posted: 22 August 2008 12:22 PM   [ Ignore ]   [ # 9 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15826
Joined  06-03-2002

Cool marramgrass - feel free to update the wiki article itself, it’s community driven afterall!

 Signature 
Profile
MSG
 
 
Posted: 31 August 2008 09:53 AM   [ Ignore ]   [ # 10 ]  
Summer Student
Avatar
Total Posts:  8
Joined  04-01-2008

For any HostGator.com clients:

A slight variation on the ORIG_PATH_INFO worked with hostgator.com accounts:

$path_info = (isset($_SERVER[‘ORIG_PATH_INFO’])) ? $_SERVER[‘ORIG_PATH_INFO’] : $_SERVER[‘PATH_INFO’];

Best, David

Profile
 
 
Posted: 16 October 2008 12:51 AM   [ Ignore ]   [ # 11 ]  
Summer Student
Total Posts:  3
Joined  10-14-2008

To get things working for me on bluehost, I set the following in index.php

$qtype = 1;

$path_info = (isset($_SERVER[‘PATH_INFO’])) ? $_SERVER[‘PATH_INFO’] : @getenv(‘PATH_INFO’);

and added

AcceptPathInfo On

to my .htaccess file.

Profile
 
 
Posted: 19 October 2008 05:06 AM   [ Ignore ]   [ # 12 ]  
Summer Student
Avatar
Total Posts:  1
Joined  10-16-2008

About Forcing URL Query Strings Because of GoDaddy Servers.
I just got turned on to ExpressionEngine this week and I love the way it neatly separates model data from view.
Thank you Jason and Bob K for helping me to get around the query string problem by “Force URL query strings” and the index.php change to $qtype=2.

Here is what GoDaddy says about my problem:

Our Linux hosting accounts run in CGI mode. When PHP 5 runs in this mode, the server variable element PATH_INFO behaves differently than under PHP 4. PHP 5 scripts can use the element SCRIPT_NAME in place of PATH_INFO to ensure the expected value is returned.

It seems this combination of CGI mode and PHP5 transferring the old functionality of PATH_INFO onto SCRIPT_NAME could be universal and independent of GoDaddy.  If it is, it might be worth having an additional Admin Preference “Use SCRIPT_NAME instead of “PATH_INFO”.  This is a great product!

George

 Signature 

George Battelle
http://www.pan-orthodox.org

Profile
 
 
Posted: 08 November 2008 08:05 PM   [ Ignore ]   [ # 13 ]  
Summer Student
Total Posts:  13
Joined  09-05-2008

Is anybody using HostMySite?

Anybody find a workaround for avoiding using Forced Query Strings for them? I tried everything else here. thanks!

Profile
 
 
Posted: 21 November 2008 10:40 AM   [ Ignore ]   [ # 14 ]  
Summer Student
Total Posts:  1
Joined  10-17-2008

We use web.com (formerly Interland) for web hosting on some manner of shared Unix server.  Setting Force URL query strings to Yes did not work, but doing that and setting the $qtype variable in the index.php file to “2” made everything work swimmingly.  Thanks to everyone for this most helpful thread.

Clarke Weigle
shakespearetavern.com

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64908 Total Logged-in Users: 39
Total Topics: 81852 Total Anonymous Users: 29
Total Replies: 440056 Total Guests: 227
Total Posts: 521908    
Members ( View Memberlist )