Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NIMMIT SEF Support thread


Guest

Recommended Posts

  • Replies 85
  • Created
  • Last Reply

Top Posters In This Topic

Nimmit,

 

Looks great can't wait to install it!

 

Just wondering though does this contribution re-write the image urls as well. If so can this feature be disabled?

 

Thanks,

 

Edwin

Link to comment
Share on other sites

ok looking at your website in a bit more detailed showed that it actually does change the image links too.

 

looking at your source code it shows the image location as:

<IMG height=100 alt="" src="Golddigga Scoop Top Charcole - Freeriderstores Tops Department ( Golddigga Scoop Top in charcole ) -_files/thundercats_g_1_2999.jpg" width=100 border=0>

 

So it looks like it does. This is probably not good for one big reason...

it increaeses page load time because images can not be cached locally.

Not to mention it means that contributions that use image locations wont work.

 

Any ideas about how we could disable the image urls from being re-written?

Link to comment
Share on other sites

I don't know what source your looking at ?

When I look it has the following ...

<img src="images/product_imgs/alphabet/thundercats_g_1_2999.jpg" border="0" alt="Thunder Cats T-Shirt" title=" Thunder Cats T-Shirt " width="100" height="100">

You seem to have part of my page titles in the code you posted ?? have another look :D

The code that you posted wouldn't display an image at all !

 

im telling you - it does not rewrite the image urls - in only rewrites <a href 's have a look at the code of url_rewrite

This is the bit that does the rewriting ...

  $pagecontent = preg_replace_callback("/(<[Aa][ \r\n\t]{1}[^>]*href[^=]*=[ '\"\n\r\t]*)([^ \"'>\r\n\t#]+)([^>]*>)/",'wrap_href',$pagecontent);

The same as silencers

Sam

Link to comment
Share on other sites

There was an error in the installation file.

 

#-----> NIMMIT:SEF:B 
require(DIR_WS_INCLUDES . 'nimmit_sef.php')
#-----> NIMMIT:SEF:E

 

changed to

#-----> NIMMIT:SEF:B 
require(DIR_WS_INCLUDES . 'nimmit_sef.php');
#-----> NIMMIT:SEF:E

 

I have also uploaded the entire mod.

Edited by Farrukh
Link to comment
Share on other sites

There was an error in the installation file.

 

#-----> NIMMIT:SEF:B 
require(DIR_WS_INCLUDES . 'nimmit_sef.php')
#-----> NIMMIT:SEF:E

 

changed to

[/code]

#-----> NIMMIT:SEF:B

require(DIR_WS_INCLUDES . '

Link to comment
Share on other sites

Hi,

 

Thanks for the contirbution, looks very slick.

 

I was trying to install it earlier, and everything appeared to be fine, all files in pace and modifications made, but upon completing the install i receive a 'Forbidden' page (in both the store side and the admin side of the site), if i remove the changes to .htaccess everything goes back to working fine.

 

I have double checked and mod_rewrite is definatly installed, SEF links are off and gzip is also off. The only thing i can think off is that my catalog side is installed in the root (not /catalog/).

 

Any ideas would be much appreciated.

 

Cheers

 

Matt

Link to comment
Share on other sites

Mine is installed in the root as well ?It shouldn't matter where you install it really. I think that it must have something todo with your host - have you used .htaccess/mod_rewrite on your server before ?

Interesting - let me know

sam

Link to comment
Share on other sites

I just installed the SEF Link Transformer mod to check, and this mod works just fine.

 

So i would assume mod-rewrite is working.

 

I will try a re-install of your mod, just incase.

 

Any other pointers you may be able to think of would be great.

 

Cheers

 

Matt

 

P.S. just by adding:

 

RewriteEngine on

RewriteBase /

 

to .htaccess it gives me the forbidden error on all pages

Edited by consoleplus
Link to comment
Share on other sites

This is a great mod!

 

I'm trying to improve it a wee bit. When you see a list of products with more than one page, clicking on the links for next/previous pages shows a url like this:

 

www.yoursite.com/category/categoryname.html?sort=1a&page=2

 

I'd like to rewrite that to be something like this:

 

www.yoursite.com/category/categoryname/sort/1a/page/2.html

 

I've managed to accomplish changing the URL in url_rewrite.php, but I haven't had any luck with the .htaccess file to change it back to the format that osCommerce needs. Here are the rewrite rules I'm using, can anyone tell me where I've gone wrong?

 

#rewrite for multiple page categories

RewriteRule ^/?(category)/(.*)/(page)/(.*)/(sort)/([^/]*)\.html$ index.php?cPath=$2&page=$4&sort=$6%{QUERY_STRING} [NC]

#rewrite for multiple page manufacturers

RewriteRule ^/?(brand)/(.*)/(page)/(.*)/(sort)/([^/]*)\.html$ index.php?cPath=$2&page=$4&sort=$6%{QUERY_STRING} [NC]

 

Anyone?

Chris Dunning

osCommerce, Contributions Moderator Team

 

Please do not send me PM! I do not read or answer these often. Use the email button instead!

 

I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.

Link to comment
Share on other sites

the first thing that i notice about your rewrite is you have them in the page and sort in the wrong order.-

Original
www.yoursite.com/category/categoryname/sort/1a/page/2.html
yours
RewriteRule ^/?(category)/(.*)/(page)/(.*)/(sort)/([^/]*)\.html$ index.php?cPath=$2&page=$4&sort=$6%{QUERY_STRING} [NC]

Sugestion
RewriteRule ^/?category/(.*)/sort/(.*)/page/([^/]*)\.html$ index.php?cPath=$1&page=$3&sort=$2%{QUERY_STRING} [NC]

you have to be quite carful -

if you have a local instalation ? Remember the rewrite log directive in .htconf

RewriteLog /path/filename.ext

RewriteLogLevel 3

I'm going on holiday today so i won't be able to see the result of this one for a while.

Good luck

sam

Link to comment
Share on other sites

i have tried using this contributtion but nothing happends i have checked in the server info and it seems that rewrite mod is installed

Loaded Modules  mod_gzip, mod_auth_passthrough, mod_log_bytes, mod_bwlimited, mod_php4, mod_frontpage, mod_ssl, mod_setenvif, mod_so, mod_auth, mod_access, mod_rewrite, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime, mod_log_config, mod_env, http_core
is this what i am looking for and if it is what i am looking for and if it is why it is not working Edited by frank1002us
Link to comment
Share on other sites

I can't make it work. I found a couple of problems:

 

1) It looks like the store has to be installed in root, since all my links now point to:

 

www.mystore.com/product/product123.html , www.mystore.com/shipping.html

 

instead of

 

www.mystore.com/catalog/product/product123.html , www.mystore.com/catalog/shipping.php

 

2) My store is in spanish, and this contribution uses the product names in english. So it's no use to me, but I'll try to mod it so it works in spanish.

 

3) I had trouble editing the .htaccess file. The rewrite rules are VERY long, so if you have word wrap enabled while editting it won't work. Maybe this is why some people are having problems.

 

Anyway, I think this is a much needed contribution. Thank you nimmit!

Edited by cuauhtli
Link to comment
Share on other sites

I tried the contrib on a store installed on root instead of on /catalog and this contrib worked OK, with restrictions.

 

I found a problem when trying to change languages: all the flags are redirected to the same page, but sorted differently. For example:

 

http://www.mystore.com/category/Books.html?sort=2a

 

Most users only have one language installed, but is necessary for others. :)

Link to comment
Share on other sites

I still can't seem to get this one to work, i always get 'Forbidden' error apages throughout the site as soon as the .htaccess is modified or even replaced with the once in the contribution (i tried this after reading aboe regarding the word wrap etc.). As i am getting a forbidden error page i assume this problem must be some way related to the .htaccess - i can use other mods that inolve mod_rewrite just fine, no errors at all.

 

I will let you know if i manage to sort it :)

 

Cheers

 

Matt

Link to comment
Share on other sites

I currently have SEF Link Transformer (SE friendly URLs):

http://www.oscommerce.com/forums/index.php?act=ST&f=7&t=50336

Installed but would be keen to upgrade to this SEF solution.

 

I was just wondering if I leave the current re-write rules in my .htaccess file and add the new rules will that allow my old urls (created by SEF Link Transformer) to continue functioning. I am not an expert of re-write rules so don't really have a clue and don't want to break my store.

 

Any help would be greatly appreciated.

 

Cheers,

 

Edwin

Link to comment
Share on other sites

hi there,

i have installed it and it works but ony on my first page, if i remove

RewriteEngine on
RewriteBase /

 

since i have seen someone reinstalling osc in to the root and it worked for him i would think by changing

RewriteEngine on
RewriteBase /

to something like

RewriteEngine on
RewriteBase /mydirectory/

should do, but that dont help :(

is there any other way i can maybe change the working directory?

 

untill then

Forbidden
You don't have permission to access /mydirectory/ on this server.


--------------------------------------------------------------------------------

Apache/1.3.19 Server at www.robinsonstestserver.cz Port 80

 

:( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :(

Link to comment
Share on other sites

ok, first part sorted.

if i change

function callback($pagecontent) {
?$pagecontent = preg_replace_callback("/(<[Aa][ \r\n\t]{1}[^>]*href[^=]*=[ '\"\n\r\t]*)([^ \"'>\r\n\t#]+)([^>]*>)/",'wrap_href',$pagecontent);
?return $pagecontent;

to

function callback($pagecontent) {
 $pagecontent = preg_replace_callback("/mydirectory(<[Aa][ \r\n\t]{1}[^>]*href[^=]*=[ '\"\n\r\t]*)([^ \"'>\r\n\t#]+)([^>]*>)/",'wrap_href',$pagecontent);
 return $pagecontent;

 

it works with no errors, but i cant add

 

# -----> NIMMIT:SEF:B

RewriteEngine on

RewriteBase /

 

#-----> single file no vars

RewriteRule ^([^/]*)\.html$ $1.php?%{QUERY_STRING} [NC]

 

#-----> one var

RewriteRule ^/?(product)/([^/]*)\.html$ product_info.php?products_id=$2&%{QUERY_STRING} [NC]

RewriteRule ^/?(category)/([^/]*)\.html$ index.php?cPath=$2&%{QUERY_STRING} [NC]

RewriteRule ^/?(brand)/([^/]*)\.html$ index.php?manufacturers_id=$2&%{QUERY_STRING} [NC]

 

#-----> two vars

RewriteRule ^/?(category)/(.*)/(product)/([^/]*)\.html$ product_info.php?cPath=$2&products_id=$4&%{QUERY_STRING} [NC]

RewriteRule ^/?(brand)/(.*)/(product)/([^/]*)\.html$ product_info.php?manufacturers_id=$2&products_id=$4&%{QUERY_STRING} [NC]

#-----> Reviews

RewriteRule ^/?(product_reviews_write|product_reviews|product_reviews_info)/product/([^/]*)\.html$ $1.php?products_id=$2&%{QUERY_STRING} [NC]

RewriteRule ^/?(product_reviews_write|product_reviews|product_reviews_info)/category/(.*)/product/([^/]*)\.html$ $1.php?cPath=$2&products_id=$3&%{QUERY_STRING} [NC]

RewriteRule ^/?(product_reviews_write|product_reviews|product_reviews_info)/brand/(.*)/product/([^/]*)\.html$ $1.php?manufacturers_id=$2&products_id=$3&%{QUERY_STRING} [NC]

#-----> products new

RewriteRule ^/?(products_new)/product/([^/]*)\.html$ $1.php?products_id=$2&%{QUERY_STRING} [NC]

# -----> NIMMIT:SEF:E

 

 to my .htaccess file then i get forbidden :-(

 

john

Edited by RobinsonDixon
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...