Jump to content
Sign in to follow this  
Romey-Rome

YASU

Recommended Posts

How do you get it to work if your store isn't in /catalog but in the root directory? I tryed taking all the "/catalog" out of .htaccess then it started doing very vierd things....

Share this post


Link to post
Share on other sites

Does

    Options +FollowSymLinks
   RewriteEngine   on
   RewriteRule     admin                      - [L]
   RewriteCond     %{REQUEST_URI}             !-d
   RewriteCond     %{REQUEST_URI}             !^/$
   RewriteRule     !\.(gif|php|css|jpg)$      /rewrite.php

work? Do you have a link to your site? When is it acting odd? Did you check to see if mod_rewrite works on your server by doing a simple rule like

    Options +FollowSymLinks
   RewriteEngine   on
   RewriteRule   /test.php   /index.php

You also might want to check if catalog is written into the code of rewrite.php anywhere.

 

Hth,

Matt

Share this post


Link to post
Share on other sites

Edit the two configure files to point to the correct directory (i.e. without /catalog)

 

Dylan

Share this post


Link to post
Share on other sites

>iiinetworks

I removed /catalog fro rewrite.php which didn't do anything.

There are no instances of /catalog in html_output.php

 

Using the code you provided I get this error when accessing categories. But the link displays the category name. ie. www.romeysblades.com/knives/

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/romey/public_html/includes/functions/database.php:13) in /home/romey/public_html/includes/functions/database.php on line 13

 

Using the test rule doesn't seem to change anything. mod_rewrite is installed.

my site is @ www.romeysblades.com , but my store is live, so I put everything back the way it was.

 

Thanks for the help!

Share this post


Link to post
Share on other sites
Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/romey/public_html/includes/functions/database.php:13) in /home/romey/public_html/includes/functions/database.php on line 13
To fix this, change the require('includes/application_top.php'); at the top of the index.php and product_info.php files to say
require_once('includes/application_top.php');

Until you get the rewrite working, I would not make the includes/functions/html_output.php changes. The site should still work otherwise with just the mod_rewrite rules and rewrite.php installed. Changing require to require_once should not affect site functionality (when not using the rewrite). That way, you should be able to get both types of URLs ( www.romeysblades.com/knives/ and http://www.romeysblades.com/index.php/cPath/24 ) working simultaneously. Once you do that, you can make the html_output changes (which make osCommerce display with the new URLs).

 

I find the regular SEF URLs goofy and would not use them. I see no advantages to writing product_info.php/products_id/24 rather than product_info.php?products_id=24. I don't think that they would hurt anything at this point though.

 

Hth,

Matt

Share this post


Link to post
Share on other sites

ehhhh....I spoke too soon. Whenever I'm on a product listing page with more than 1 page, and I click on next, I get:

 

"Fatal error: Call to undefined function: shift()in /home/romey/public_html/rewrite.php on line 79"

 

Thanks.

Share this post


Link to post
Share on other sites
Whenever I'm on a product listing page with more than 1 page, and I click on next, I get:

 

"Fatal error: Call to undefined function: shift()in /home/romey/public_html/rewrite.php on line 79"

I don't remember what I had to do to get the product listing pages working. They are a pain. I'll look into adding some changes for the listing_split class and uploading a new version.

 

You might have to rewrite the Back button code to point to

tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', $cPath_array)

or something like that ($cPath_array may not be the right name).

 

Hth,

Matt

Share this post


Link to post
Share on other sites

i too get an error on line 79 of rewrite.php using this mod and its pointing to an undeclared function called "shift()" where is this function listed at ?

Share this post


Link to post
Share on other sites
i too get an error on line 79 of rewrite.php using this mod and its pointing to an undeclared function called "shift()" where is this function listed at ?
Try changing to array_shift instead.

 

I uploaded a new version of the contribution if you want to try that.

 

Hth,

Matt


Always back up before making changes.

Share this post


Link to post
Share on other sites

Hi.

 

The header_tag controller did not show the product_info tags.

the title will be detectet but the keywords and the description not.

 

Any Idea?

Share this post


Link to post
Share on other sites

Has anybody got a live store with this contribution running on it? I just want to see the final result??


Knowledge is knowing that a tomato is a fruit, wisdom is not putting one in a fruit salad :D

Share this post


Link to post
Share on other sites
The header_tag controller did not show the product_info tags.

the title will be detectet but the keywords and the description not.

I would try changing the following code from includes/application_top.php
// BOF: WebMakers.com Added: Header Tags Controller v1.0
 require(DIR_WS_FUNCTIONS . 'header_tags.php');
// Clean out HTML comments from ALT tags etc.
 require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
// Also used by: WebMakers.com Added: FREE-CALL FOR PRICE
// EOF: WebMakers.com Added: Header Tags Controller v1.0

to

  if ($PHP_SELF != 'rewrite.php') {
// BOF: WebMakers.com Added: Header Tags Controller v1.0
   require(DIR_WS_FUNCTIONS . 'header_tags.php');
// Clean out HTML comments from ALT tags etc.
   require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
// Also used by: WebMakers.com Added: FREE-CALL FOR PRICE
// EOF: WebMakers.com Added: Header Tags Controller v1.0
 }

and adding the original code into the rewrite.php file.

 

Essentially the problem is that it is trying to generate the header tags before it knows what product it is. With most of the other cases where this happened, I moved the variable definition into the rewrite.php file and it worked.

 

Hth,

Matt

 

P.S. I'm not sure that I understand the issue with the all prods that you mention in your other post. Perhaps you could explain more? Possibly with example links?

 

P.P.S. I know of two sites that are using this mod, but I'm not really comfortable posting them here as they are not my sites. If someone has a site installed that meets the My Store posting criteria, please post the link here. Thanks.


Always back up before making changes.

Share this post


Link to post
Share on other sites
and adding the original code into the rewrite.php file.

 

I`m not shure what code must in the rewrite.php to show the metas.

 

>Allprods A and also the categories without unique products cannot indicate these articles. In each case a Product is indicated. The article number does not seem more rewriter to evaluate correctly.

Share this post


Link to post
Share on other sites

Hi.

The url looks like domain.com/computer+cpu+cooler

 

is it possible to change it into domain.com/computer-cpu-cooler?

Share this post


Link to post
Share on other sites
is it possible to change it into domain.com/computer-cpu-cooler?
Sure. You would lose the ability to include dashes in the product, category, and manufacturer names though. You can just add str_replace calls in rewrite.php and the tep_href_link function.

 

Hth,

Matt


Always back up before making changes.

Share this post


Link to post
Share on other sites

Hello,

 

i don't understand how to make the modifications to change '+' --> '-'

 

I would like to make modification to change all ' ?, ?, ?, ? ....' --> 'e, e, u, a ....' and all ",' ... to --> space

 

Thanks

 

Ludo

Share this post


Link to post
Share on other sites

Space is not a goot sign for g...le. Also take an %20 in URL and that isnt what the user want to see. Make it like ecartz is told. You have to chance the rewrite.

Share this post


Link to post
Share on other sites

Could someone please post thier htaccess and rewrite.php files that does not have their store in the /catalog/ folder?

 

I have mine installed at root, and I cannot get these rules to work.

 

Thanks for the help!

 

Burke Jones

Edited by bsnrjones

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×