Post by vintagetractors » Tue Aug 30, 2011 8:54 pm

Namesco cannot offer any advice-they say the script I have saved online works on their test site...but still no luck getting it to actually work with OpenCart (upgraded to 1.5.1.1)


Posts

Joined
Thu Jul 28, 2011 10:33 pm

Post by redvangang » Tue Aug 30, 2011 10:13 pm

Hi redvagang,
I'm still having problems so I've asked Namesco for advice too...I have copied the script and uploaded, ticked the SEO box but still no luck.

Re. your 301 query...I am pretty sure the you can use the 301 redirect rule in .htaccess. Although Namesco are Zeus they do support this function. Hope that helps.[/quote]

Hi vintagetractors
Have you also put the word(s) you want to use for the SEO url into the SEO Keyword box under the Data tab for each product?

Thanks for the 301 .htaccess tip. I've given it a try - no luck yet but will keep trying, hoping to hang on to at least some of the page rank it's taken me 8.5 years to build up! Namesco have been absolutely no help at all.

Newbie

Posts

Joined
Mon Aug 15, 2011 12:18 am

Post by vintagetractors » Tue Sep 06, 2011 9:10 pm

HI redvegang,

It is a shame to hear Namesco have been no help to you either-was very frustrating to have such poor responses to queries, and each time from a different person!

I have not put words into every category/product...it didn't work when I started off adding bits so I had left this blank...the only ones I can get to work, with SEO ticked, are the ones with no word in the SEO keyword box.

I have a couple of 301s in this site, and this is how I've written it in the .htaccess file...apologies if this is exactly as you have tried it and so is no help at all but thought it worth sending through:

Redirect 301 /vintage-tractors-for-sale/ferguson/ferguson-TE20-tractors.html http://www.classicvintagetractors.co.uk ... ctors.html


Posts

Joined
Thu Jul 28, 2011 10:33 pm

Post by PalMultimedia » Sun May 20, 2012 4:30 am

Hi all
here is some rewrite code which is working fine for me. Please dont ask me how it works or if you get an error because I dont know but some how I manage to find out this code and working for me so....

put this code in root folder in a file name called rewrite.script


##match URL into $ with ^/[^/]*\.html$
##if matched then set URL = /index.php

RULE_0_START:
# get the document root
map path into SCRATCH:DOCROOT from /
# initialize our variables
set SCRATCH:ORIG_URL = %{URL}
set SCRATCH:REQUEST_URI = %{URL}

# see if theres any queries in our URL
match URL into $ with ^(.*)\?(.*)$
if matched then
set SCRATCH:REQUEST_URI = $1
set SCRATCH:QUERY_STRING = $2
endif
RULE_0_END:

RULE_1_START:
# prepare to search for file, rewrite if its not found
set SCRATCH:REQUEST_FILENAME = %{SCRATCH:DOCROOT}
set SCRATCH:REQUEST_FILENAME . %{SCRATCH:REQUEST_URI}

# check to see if the file requested is an actual file or
# a directory with possibly an index. don't rewrite if so
look for file at %{SCRATCH:REQUEST_FILENAME}
if not exists then
look for dir at %{SCRATCH:REQUEST_FILENAME}
if not exists then
set URL = /index.php?_route_=%{SCRATCH:REQUEST_URI}
goto QSA_RULE_START
endif
endif

# if we made it here then its a file or dir and no rewrite
goto END
RULE_1_END:

QSA_RULE_START:
# append the query string if there was one originally
# the same as [QSA,L] for apache
match SCRATCH:ORIG_URL into % with \?(.*)$
if matched then
set URL = %{URL}&%{SCRATCH:QUERY_STRING}
endif
goto END
QSA_RULE_END:

User avatar
New member

Posts

Joined
Wed Feb 02, 2011 9:17 pm

Post by nikito » Sun Aug 12, 2012 2:03 pm

Hi,
I am totally lost as I do not have a strong scripting background.

Can someone give me an eg... ##match URL into $ with ^/[^/]*\.html$ and
##if matched then set URL = /index.php

also.. set URL = %{URL}&%{SCRATCH:QUERY_STRING}

Thanks in advance!

New member

Posts

Joined
Tue Jul 31, 2012 9:33 am
Who is online

Users browsing this forum: mhglobal and 63 guests