Post by aleks » Sat Jul 12, 2008 2:56 pm

Hi all, I just downloaded the latest version of OpenCart for a new website Im developing.  The link is here http://www.weareonfire.co.nz/kiwivelo/store/ and if you try and click on any of the products, the links dont work.  This happens with the url aliasing on AND off in the admin.  I havent changed any of the original opencart code.  Kinda stuck at the moment.  Can anyone give me some advice?

Thanks in advance.

Newbie

Posts

Joined
Sat Jul 12, 2008 2:52 pm

Post by bruce » Sat Jul 12, 2008 3:43 pm

Try removing the rewrite lines or the entire htaccess file and also turn off the url alias.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by aleks » Mon Jul 14, 2008 2:52 pm

Thanks for the reply Bruce, however it didnt make it work.  I removed the lines first and then tried removing the whole .htaccess file.  Is there a way to just disable the url aliasing completely?  Because I just want to get the link to work at at least when I click on them, url aliased or not..

Newbie

Posts

Joined
Sat Jul 12, 2008 2:52 pm

Post by bruce » Mon Jul 14, 2008 4:56 pm

You have to turn it off in the admin also

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by aleks » Tue Jul 15, 2008 12:19 pm

Yeah I tried turning it off in the admin too but it didn't work.  Good news tho, I managed to disable the url aliasing in the controller file by commenting some code out.  So the links work now, without the aliasing of course, but they work nonetheless.  Thanks for your help and replies  ;)

Newbie

Posts

Joined
Sat Jul 12, 2008 2:52 pm

Post by SiteE@se » Tue Jul 15, 2008 6:33 pm

I've run into this issue on a test installation of 0.7.8 today.  I just replaced url.php in library->environment with the version from 0.7.7 to get back to the standard urls and a working cart.  Don't need friendly urls for the test site, which is just being used to experiment with templates.

Chris

Chris @ SiteE@se Web Design


Active Member

Posts

Joined
Mon Dec 17, 2007 7:40 am
Location - UK

Post by hm2k » Tue Jul 15, 2008 6:56 pm

I probably didn't test this issue as much as I could have done.

I have a few tricks to resolve these issues, which i'll probably release as 0.7.8a once I get a little bit of time to play.

UK Web Hosting


User avatar
Global Moderator

Posts

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

Post by SiteE@se » Wed Jul 16, 2008 12:42 am

siteease wrote: I just replaced url.php in library->environment with the version from 0.7.7 to get back to the standard urls and a working cart.
Please ignore that - it breaks the admin login .....

Chris

Chris @ SiteE@se Web Design


Active Member

Posts

Joined
Mon Dec 17, 2007 7:40 am
Location - UK

Post by Kulsha » Wed Jul 16, 2008 3:46 pm

Hello
I'm having the same problem with pages not opening. Setting admin to no URL alias and deleting .htaccess doesn't work.

Can you tell me which controller file you edited and what code you commented out?  I opened the url_alias.php file, assuming it might be that one but wouldn't have a clue what to comment out if its infact the right file to fiddle with. 

Or any other easy fix if anyone could help please.

Thanks

Newbie

Posts

Joined
Wed Jul 16, 2008 3:44 pm

Post by activeebiz » Thu Jul 17, 2008 1:29 am

Here is how to be able to turn on and off url Aliases in admin for version (0.78)

In this file:

library/environment/url.php

change:
if (!preg_match('/\/admin\/index.php/',$_SERVER['PHP_SELF'])) {
to
if ((!preg_match('/\/admin\/index.php/',$_SERVER['PHP_SELF'])) && ($this->config->get('config_url_alias'))) {

After having done this change you can get turn off the use of url rewrites simply by going into your shops admin under

Admin >. Configuration >> Settings

and set

Use URL Alias: to "false" if you can't or simply dont want to use url rewites on your server/hosting set-up


And if you later on change your mind and want to use them, then its just to switch them to "on" again in the admin.

If you have them set to "on" then also make sure that you have a correctly set-up .htaccess file in your shops main folder.

Newbie

Posts

Joined
Mon Jun 09, 2008 2:10 am

Post by Kulsha » Thu Jul 17, 2008 9:47 am

Thank you very much, I would never have known how to do this without your help. It all works fine now!

;D

Newbie

Posts

Joined
Wed Jul 16, 2008 3:44 pm

Post by JNeuhoff » Tue Jul 22, 2008 7:13 pm

I came accross the same issues while testing the new OpenCart 0.7.8 and posted a summary on http://code.google.com/p/open-cart/issues/detail?id=32 .

Notice that if you want URL Alias enabled, make sure also to include the 'RewriteBase' command in the '.htaccess' file:

Code: Select all

# Please ensure register_globals is Off by uncommenting this line
#php_flag register_globals Off

# URL Alias - see install.txt

Options +FollowSymlinks

<IfModule mod_rewrite.c>
RewriteEngine On

# Put your installation directory here:
# If your URL is www.example.com/shop/, use /shop/
# If your URL is www.example.com/, use /
RewriteBase /juergen/opencart-0-7-8/


#OPENCART REWRITES START
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
#OPENCART REWRITES END

</IfModule>

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by activeebiz » Fri Jul 25, 2008 9:11 pm

After having looked over the url functions in 0.78 ... i have some suggestions for the next version based on some mods i have done on my dev site.

Remove the code which rewrites the urls to a format like this:

YOUR-SHOP_URL/product/product_id/3

Its has no real function and does not really present any advantage over the orginal urls like:

YOUR-SHOP-URL/index.php?controller=product&product_id=3

Most if not all of the major search engines will index and rank such url styles about the same.


The url which on the other hand provide an advantage has some relevant keywords in them ....

So providing use url aliases is set to true ... Then url aliases should be autogenerated for atleast products and categories.

Also if someone comes to your site via a link in the old url style , redirect them to the new rewritten url alias address.

Newbie

Posts

Joined
Mon Jun 09, 2008 2:10 am
Who is online

Users browsing this forum: No registered users and 3 guests