Hi Conor!
My appology because it was a very simple and somehow stupid mistake of my side! My error was that for htaccess page I did not had included the . in front of the htaccess! That's why it wasn't reconizing it!
I solved that problem already once I realized what happened.
BTW, I'm moving from oscommerce to zen-cart!
However, now I have a few other pages that are not being rewritten or at least that's what I believe... I have checked the installation doc files and while these talk about these pages, I guess I'm not figuring it out... If there is a thread that mention this already, please point me to it because I've been reading and reading and I cannot find it.
PAGES NOT BEING REWRITTEN:
-
all pages that go inside of the information box that in my case includes: about us, shipping, returns, privacy, conditions, contact, sitemap, unsubscribe, discounts and coupons, newsletter, gift certificates. All of these, I have them inside of the information box and not part of the EZ-Pages.
This is an example of how about_us shows: index.php?main_page=about_us. Please tell me if that's the right way to show instead of: domain.com/about_us?
-
Other pages that show like about us example include: New products: index.php?main_page=products_new (not sure if that's the way that's the way it should look here) and featured products: index.php?main_page=featured_products
-
I installed the addon Wordpress on Zencart (WOZ). Now, this addon on the admin configuration side stays the following:
NOTE:
please edit the following file.
/includes/init_includes/init_ceon_uri_mapping.php
Add the new lines shown, around approx line 115:
$uri_to_match = preg_replace('/[^a-zA-Z0-9_-./%]/', '', $request_uri);
// for WordPress On ZenCart BOF
$woz_uri_query = "
SELECT
um.language_id,
um.uri
FROM
" . TABLE_CEON_URI_MAPPINGS . " um
WHERE
um.main_page = '" . FILENAME_WORDPRESS . "'
ORDER BY
BIT_LENGTH(um.uri) DESC;";
$woz_uri_result = $db->Execute($woz_uri_query);
$woz_uri = '';
while (!$woz_uri_result->EOF) {
$woz_uri = $woz_uri_result->fields['uri'];
if(ereg("^$woz_uri", $uri_to_match)){
if(ereg("/comments/feed/", $uri_to_match)){
$_GET['feed'] = 'comments-rss2';
}else if(ereg("/feed/", $uri_to_match)){
$_GET['feed'] = 'rss2';
}
$uri_to_match = $woz_uri;
break;
}
$woz_uri_result->MoveNext();
}
// for WordPress On ZenCart EOF
if (substr($uri_to_match, -1) == '/') {
I followed the instructions and I get a black page. I guess I'm placing it on the wrong part of the page? I tried in different sides, but still get a black page with it. Please tell me, where in here should I place it?
if (!isset($_SESSION['language']) || isset($_GET['language'])) {
$lng = new language();
if (isset($_GET['language']) && zen_not_null($_GET['language'])) {
$lng->set_language($_GET['language']);
$language_changed = true;
unset($_GET['language']);
} else {
if (LANGUAGE_DEFAULT_SELECTOR == 'Browser') {
$lng->get_browser_language();
} else {
$lng->set_language(DEFAULT_LANGUAGE);
}
}
$_SESSION['language'] = (zen_not_null($lng->language['directory']) ?
$lng->language['directory'] : 'english');
$_SESSION['languages_id'] = (zen_not_null($lng->language['id']) ?
$lng->language['id'] : 1);
$_SESSION['languages_code'] = (zen_not_null($lng->language['code']) ?
$lng->language['code'] : 'en');
}
if ($language_changed && $original_language_id == $_SESSION['languages_id']) {
$language_changed = false;
}
if (is_null($original_language_id)) {
$original_language_id = $_SESSION['languages_id'];
}
ADDITIONAL QUESTIONS:
- I have written the 404 rule in the htaccess as: ErrorDocument 404 index.php?main_page=page_not_found . It works, just want to ensure that's the proper way to write it.
DEALING WITH THE DUPLICATE CONTENT:
Google sees mydomain.com, https://www.mydomain.com and event mydomain.com/ and https://www.mydomain.com/ each as different pages as per what experts say.
Will the below rule be enough and still compatible with the CEON URI MAPPING addon?
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www.domain.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
</IfModule>
My last question and also related to url rewrite. I found this info online:
Next, lets say you are changing to Zen Cart from some *other shopping cart platform and wish to retain your link juice, PageRank and such by redirecting the old urls to the new.
We can do this easily by sending all requests to the root, but it’s far more effective to use some logical redirecting to the proper area in the *new cart. For this a query string redirect is perfect.
RewriteEngine On
RewriteCond %{QUERY_STRING} category=76
RewriteRule (.*) http://www.domain.com/index.php?main_page=index&cPath=220$1? [R=301,L]
In this case, we identified a string (category=76) in all urls of our old site’s category and are redirecting them by matching the string to our new category. Remember to use your proper canonical.
How do we apply this rewrite rule once we have applied the CEON URI MAPPING (SEO) addon?
Conor, I will appreciate that you take a look at them and give me a brief answer.
Highly appreciated,
Loyd