Post by fido-x » Mon Jan 12, 2009 10:23 am

I've noticed that addresses are showing up in the address bar as "?controller=whatever" instead of "index.php?controller=whatever". This is happening in both the catalog and administration.

Suggested fix -- change line 75 in "library/environment/url.php" from

Code: Select all

$link = '?' . $qs;
to

Code: Select all

$link = 'index.php?' . $qs;

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Qphoria » Mon Jan 12, 2009 10:24 am

Yes, its a new feature. index.php isn't necessary

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by fido-x » Mon Jan 12, 2009 10:40 am

Thanks for clearing that up. I realize that "index.php" isn't absolutely necessary, but it was a bit disconcerting not seeing it in the address bar.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Qphoria » Mon Jan 12, 2009 10:44 am

we re slaves to what we are used to :) It was actually part of a fix for query vars coming back on payment urls. the removal of index was something hm2k found to be cutting edge or something :)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by hm2k » Mon Jan 12, 2009 6:42 pm

I decided that adding and removing the "index.php" from the routing was pointless when it wasn't even needed in the first place.

The main benefit of this is that URLs are shorter, and thus more friendly by default.

It's worth noting that both URLs will work, both the index? and ?, they always have done, only now we default to the shorter option.

However most people just use the URL aliases anyway and won't even notice this change.

If there's any reason why this doesn't work for you, i'd love to hear it.

Thanks.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK
Who is online

Users browsing this forum: No registered users and 4 guests