Post by eatblueorange » Thu Apr 08, 2010 10:03 pm

im new to editing the .htaccess...anyone there know how apply these in the htacess file so that it could read as
http://www.yourshop.com/index.html and not with index.php?route=common/home?

and also is it possible to automatically SEO the product pages in the .htacess because the store owner sometimes dont bother to fill up the SEO url field when adding a product,

I want a url like this http://www.yourstore.com/index.php?rout ... duct_id=56
to automatically be http://www.yourstore.com/product-electronics-56
using the using code techniques in .htaccess? any brillant .htaccess guru there?

User avatar
Newbie

Posts

Joined
Fri Mar 12, 2010 5:16 am


Post by Melanie » Wed Jul 07, 2010 11:30 am

Any news on this, would love to get rid of the "index.php?route=common/home" on the main page!

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by Johnathan » Wed Jul 21, 2010 10:24 am

Take a look at my tutorial in this topic.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by ifyouseek » Thu Sep 02, 2010 3:10 pm

If you're using multi-store you need to use the code below. Im not sure if i have changed it correctly, i just changed the url for a forward slash but maybe it could be removed completely. It is working fine on both my shops on different urls. Thanks

Code: Select all

RewriteCond %{QUERY_STRING} ^route=common/home$
RewriteRule ^index\.php$ /? [R=301,L]

Active Member

Posts

Joined
Thu May 06, 2010 4:40 pm

Post by vojtech25 » Fri Sep 03, 2010 3:30 am

Hey guys,

I have problem with SEO too. But it does not work in general. When I disable using SEO, every products and categories are appearing normally, WITHOUT problems.. But when I enable SEO in admin, it does not work.. when i click on the product that i clicked before, it writes PAGE NOT FOUND..

I think there could be a problem with a .htaccess? I have there

Code: Select all

RewriteEngine On
RewriteBase / 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]
is it right or not? Thanks

______________________________________________________
http://www.vojtechzahorsky.com


New member

Posts

Joined
Tue Jan 19, 2010 7:18 pm

Post by Xsecrets » Fri Sep 03, 2010 3:32 am

vojtech25 wrote:Hey guys,

I have problem with SEO too. But it does not work in general. When I disable using SEO, every products and categories are appearing normally, WITHOUT problems.. But when I enable SEO in admin, it does not work.. when i click on the product that i clicked before, it writes PAGE NOT FOUND..

I think there could be a problem with a .htaccess? I have there

Code: Select all

RewriteEngine On
RewriteBase / 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]
is it right or not? Thanks
if your store is in a folder like shop or store you will need to edit the line RewriteBase / to be RewriteBase /shop/

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by vojtech25 » Fri Sep 03, 2010 3:41 am

No it is not, it is in the home folder... I totally dont know whats wrong.

______________________________________________________
http://www.vojtechzahorsky.com


New member

Posts

Joined
Tue Jan 19, 2010 7:18 pm

Post by vojtech25 » Fri Sep 03, 2010 4:17 am

I am also watching the error.txt log, and there is very strange warning:
2010-09-02 22:01:34 - PHP Notice: Undefined index: query in /home/mysite.com/catalog/model/tool/seo_url.php on line 11
What the hell is that? :D

______________________________________________________
http://www.vojtechzahorsky.com


New member

Posts

Joined
Tue Jan 19, 2010 7:18 pm

Post by Xsecrets » Fri Sep 03, 2010 4:19 am

is your host using apache web server?

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by vojtech25 » Fri Sep 03, 2010 4:23 am

100% yes. Because I am using this host for other domain for testing opencart, and it is working clear.. and the .htaccess is looking the same ... I am probably crazy :D I realle have no clue.

______________________________________________________
http://www.vojtechzahorsky.com


New member

Posts

Joined
Tue Jan 19, 2010 7:18 pm

Post by vojtech25 » Fri Sep 03, 2010 3:28 pm

.htaccess is right, apache and mod_rewrite is right.. Where could be a problem??

______________________________________________________
http://www.vojtechzahorsky.com


New member

Posts

Joined
Tue Jan 19, 2010 7:18 pm

Post by vojtech25 » Fri Sep 03, 2010 4:02 pm

Solved guys, sorry for stupid question. I had disabled using ".htacces" :D

______________________________________________________
http://www.vojtechzahorsky.com


New member

Posts

Joined
Tue Jan 19, 2010 7:18 pm

Post by yest » Sun Sep 05, 2010 1:10 am

i suddenly get this:

Fatal error: Call to a member function rewrite() on a non-object in /home/wpstore/public_html/catalog/controller/common/header.php on line 25

what it means ?

New member

Posts

Joined
Thu Aug 05, 2010 1:57 am

Post by Purebeads » Sun Sep 05, 2010 2:59 pm

I'm just curious. Do you guys want to change "index.php?route=common/home" to "index.html" simply for aesthetic reasons? My cart is in the subdirectory "catalogue", so I just tell my customers to go to http://www.purebeads.com/catalogue/ -- there is no need for them to type index.html.

Active Member

Posts

Joined
Fri Apr 30, 2010 12:07 pm

Post by yest » Sun Sep 05, 2010 5:55 pm

i think its better for seo no ?

by the way this is the reasen for the eror ?

New member

Posts

Joined
Thu Aug 05, 2010 1:57 am

Post by QenTox » Mon Oct 25, 2010 3:57 am

I added the required line in .htacces file and it works as it should. I just wonder, how come it says at the left bottom corner of the browser window, that is going to send me to "www.mysite.com/index.php?route=common/home" but it will actually send me to the "www.mysite.com". I know it is no issue, but still I am thinking about it :-)

Newbie

Posts

Joined
Sun Aug 15, 2010 8:03 am

Post by Johnathan » Mon Oct 25, 2010 4:12 am

.htaccess doesn't change the actual links, it just redirects as the link is being resolved.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Joxe » Mon Nov 08, 2010 12:43 am

Hi,

Did not work for me.
My store has 2 languages and it's 1.4.7 :-\

v. 1.4.9.6 & v. 2.0.2.0


Active Member

Posts

Joined
Wed Apr 28, 2010 6:12 am

Post by alex.lin » Mon Nov 08, 2010 1:06 pm

insert a keyword for common/home
like "INSERT INTO `url_alias` SET query = 'common/home',keyword = ''home"

it would be easier. :)

Opencart Developer

- http://www.cnopencart.com opencart中文站


User avatar
Active Member

Posts

Joined
Thu Jun 03, 2010 12:15 am


Post by ocs » Mon Nov 08, 2010 1:29 pm

Johnathan wrote: Are you using GET on the homepage? What for?
No, I am not. I just want to know more...

then anyone know how to seo index.php?route= to /
but index.php?route=common/home also seo.

Many Thanks Johnathan

ocs
New member

Posts

Joined
Tue Oct 26, 2010 12:07 am
Who is online

Users browsing this forum: Bing [Bot] and 68 guests