Zen Cart Logo
Forums / All Other Contributions/Addons / Ultimate SEO .htaccess problem and broken Admin interface

Ultimate SEO .htaccess problem and broken Admin interface

Views: 9,045

Results 1 to 20 of 21
19 May 2012, 7:27 PM
#1
erint29 avatar

erint29

New Zenner

Join Date:
May 2012
Posts:
3
Plugin Contributions:
0

Ultimate SEO .htaccess problem and broken Admin interface

I recently installed zen-cart on a new url and then added Ultimate SEO urls mod. http://imagenationclothing.com/

The mod seemed to be working correctly and changing the urls to seo urls when I clicked on the category pages, however now I can't log into my admin panel. Also, I started getting the 404 error: http://www.imagenationclothing.com/photo-skirts-c-1.html whenever I go so something other than the homepage. After looking around for support and answers, it seems like it could be a problem with the .htaccess file that was added as part of the mod.

The .htaccess code is as follows:

NOTE: Replace /shop/ with the relative web path of your catalog in the "Rewrite Base" line below:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /imagenationclothing/

From Ultimate SEO URLs

RewriteRule ^(.)-p-(.).html$ index.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-c-(.).html$ index.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-m-([0-9]+).html$ index.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.
)-pi-([0-9]+).html$ index.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-pr-([0-9]+).html$ index.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.
)-pri-([0-9]+).html$ index.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-ezp-([0-9]+).html$ index.php?main_page=page&id=$2&%{QUERY_STRING} [L]

All other pages

Don't rewrite real files or directories

RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-dT
RewriteRule ^(.*).html$ index.php?main_page=$1&%{QUERY_STRING} [L]

Any help is greatly appreciated - I'm confused as to why it would break the admin panel when it was working before.

19 May 2012, 7:59 PM
#2
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

Try changing your rewrite base to this, since your zencart does not appear to be in a subfolder:

RewriteBase /

This rewriter mod has been upgraded by someone for 1.5, but can be tricky at first. See threads:

http://www.zen-cart.com/showthread.php?194441-errors-in-admin-from-ultimate-seo-urls

http://www.zen-cart.com/showthread.php?35034-Chemo-s-Ultimate-URL-s

There may be more links.

sph
prommart com
promdressesforless us

PS: If you want to use the www version for your site url, you might add something like this at the end of your htaccess (after setting it up in your configuration.php files)

RewriteCond %{HTTP_HOST} ^promdressesforless.us$ [NC]

RewriteRule ^(.*)$ http://www.promdressesforless.us/$1 [R=301,L]

20 May 2012, 9:27 PM
#3
erint29 avatar

erint29

New Zenner

Join Date:
May 2012
Posts:
3
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

SPH:

Try changing your rewrite base to this, since your zencart does not appear to be in a subfolder:

RewriteBase /

This rewriter mod has been upgraded by someone for 1.5, but can be tricky at first. See threads:

http://www.zen-cart.com/showthread.php?194441-errors-in-admin-from-ultimate-seo-urls

http://www.zen-cart.com/showthread.php?35034-Chemo-s-Ultimate-URL-s

There may be more links.

sph
prommart com
promdressesforless us

PS: If you want to use the www version for your site url, you might add something like this at the end of your htaccess (after setting it up in your configuration.php files)

RewriteCond %{HTTP_HOST} ^promdressesforless.us$ [NC]

RewriteRule ^(.*)$ http://www.promdressesforless.us/$1 [R=301,L]

Thanks! I figured that out and it seems to be working, however my admin panel is still not working (I get to the login page) but after typing user name and password I just get a blank white page. Any ideas on why this isn't working and how I can fix it?

21 May 2012, 6:52 AM
#4
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

Does your admin url change from the login to the next, blank page? Without revealing your re-named admin folder, can you give an idea of any change?

Also, what is your main url: www or non-www?

How about your configuration.php files in admin includes and includes? Are they set up correctly?

admin/includes/configure.php example:

define('HTTP_SERVER', 'http://www.yourdomain.com');
define('HTTPS_SERVER', 'https://www.yourdomain.com');
define('HTTP_CATALOG_SERVER', 'http://www.yourdomain.com');
define('HTTPS_CATALOG_SERVER', 'https://www.yourdomain.com');

includes/configure.php example:

define('HTTP_SERVER', 'http://www.yourdomain.com');
define('HTTPS_SERVER', 'https://www.yourdomain.com');

Once you get in to your admin, looks like you still have to re-set the layout boxes controller to get your columns.

sph
prommart com

21 May 2012, 6:17 PM
#5
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

That link is an SEO re-writer for Wordpress. Is it also supposed to work with zencart?

The zencart mod Ultimate SEO URL works with zencart 1.3.9h and 1.5. I don't know that it is the cause of the problem in this thread.

sph
prommart com

19 Aug 2012, 6:50 AM
#6
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

You're not likely to get much help ASAP without a link or non-linked text address to your site so people can take a look at what's going on.

Also, the most recent main thread for Ultimate SEO URL seems to be here:

http://www.zen-cart.com/showthread.php?44104-Ultimate-SEO-URLs

But the zencart moderators don't like duplicate posts much, so I don't know how they'd feel about re-posting there. Maybe they'll move this thread there.

19 Aug 2012, 5:18 PM
#7
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

Okay, I think you have two problems:

  1. If your zencart is in the top level root domain, your htaccess would just be this:

RewriteBase /

But if you have your zencart in a subfolder (as yours appears to be?), it would be this:

RewriteBase /YOURSUBFOLDER/

So if your subfolder is 1index.php it would be;

RewriteBase/1index.php/

But that is wrong, for problem no. 2...

  1. Your apparent subfolder - 1index.php - isn't a subfolder at all but a file of some kind. If you want your zencart to be in a subfolder, you will need to make an actual subfolder, calling it what you want your zencart to be: perhaps "store"? So your zencart would be in this subfolder and it's url would look something like this:

http://dowelldentalproducts.com/store

But why do you have the Magic Zoom stuff at your top level instead of your zencart store?

Below I copied a portion of my htaccess which I am using on a zencart in a sub-folder, one of my test sites.

NOTE: Replace /shop/ with the relative web path of your catalog in the "Rewrite Base" line below:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /zencart-demo/

PS: Later things you might look at is if you're going to use the www. in your urls or not. But you can get this resolved first.

19 Aug 2012, 5:28 PM
#8
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

I guess it has to be resolved: exactly where is your Zencart?

19 Aug 2012, 5:42 PM
#9
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

Thanks. While doing some work around the house it hit me that what you probably have is conflicting index.php problems between zencart and the magic zoom thing.

19 Aug 2012, 5:52 PM
#10
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

Here's a portion of an htaccess for one of my sites here - top-level - using Ultimate SEO URL:

http://www.promdressesforless.us/

NOTE: Replace /shop/ with the relative web path of your catalog in the "Rewrite Base" line below:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /

19 Aug 2012, 5:59 PM
#11
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

selcyis:

Yeah, magic zoom isn't installed though.. it just sitting in my root or unless it's copy in my index.php file. Would you like my FTP info to see the issue?

While I hope and plan on getting into the zencart biz...on top of my retail thing...I'm not quite there yet so don't think having your FTP access is right just now. But I can imagine what you have. I doubt that your zencart will work at all...with or without Ultimate SEO...until the index.php magic zoom is resolved.

But once it is resolved, I expect everything will work.

19 Aug 2012, 6:04 PM
#12
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

In my experience and testing, Ultimate SEO URL is a pretty easy plugin install and it works. Main problem area is getting the htaccess right, and I think the file itself is confusing:

NOTE: Replace /shop/ with the relative web path of your catalog in the "Rewrite Base" line below:

We think that we should replace "shop" with our domain name or address, when in reality that is how you do it if zencart is in a subfolder. And then, it should just be the name of the subfolder zencart is in, not the full domain name or url.

It should be more clear that if zencart is in the top-level, it should just be:

RewriteBase /

19 Aug 2012, 6:18 PM
#13
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

First, magic zoom. What files were they that you uploaded? Is one called index.php? If so, it is taking the place of zencart's index.php. If magic zoom isn't an index.php file, what is it? Even if it's just sitting there, it may be using an index.php file?

Second, Ultimate SEO URL has two sets of 1.5 files or packets. One called "affected_files_150"; the other called "new_files_150_English". You upload both to their correct positions.

The "affected_files_150" packet doesn't have a seo file.

And I see several seo files in the "new_files_150_English" folder packet.

Also, don't upload the two packet folders themselves. Just the folders/files inside them.

19 Aug 2012, 7:29 PM
#14
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

I see magic zoom at your top level here:

http://dowelldentalproducts.com/

I guess magic zoom isn't using an index.php file, as there is nothing here:

http://dowelldentalproducts.com/index.php

Perhaps all you need do is re-name your zencart from 1index.php back to index.php? Did you make any other changes, perhaps in your configure.php files?

Is magic zoom perhaps using an index.html file? Somehow, it is showing at your top level.

The hardest thing with Ultimate SEO is getting the htaccess right, and it is deceptively tricky or confusing.

NOTE: many knowledgeable people here at Zencart point out that these re-written urls of any kind are not necessary for SEO or customer satisfaction or conversion, that re-writing can cause problems especially with other plugins and Zencart upgrades, and they may be correct. But I miss re-written urls on my main site - prommart com - and plan to return to re-writing when I upgrade to 1.5 soon. I miss being able to read my own urls.

I've tested Ultimate SEO enough to risk going with it myself. But you might want to catch-up with my and other's posts here:

http://www.zen-cart.com/showthread.php?44104-Ultimate-SEO-URLs/page104

19 Aug 2012, 10:08 PM
#15
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

Great! Looks like it's going to work.

Didn't really see your categories on this TM template but found a product. Personally, I like to take the category path out of the product url, as in my product here:

http://www.promdressesforless.us/night-moves-5878-rts2-p-12.html

I think it more in-line with the canonical url, but that is a personal preference and I don't even know if it's best practice with the rewriter. But I think that was the out-of-the-box install.

Remember, this little re-writer doesn't necessarily re-write all pages...at least by default...but it re-writes the categories and products, which are my main interest.

You're welcome and good luck!

19 Aug 2012, 10:23 PM
#16
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

Sorry, but hold-on. I don't know if it is working properly.

When I hover my cursor on your Contacts page and before I click, I can see at the bottom of my browser (IE9) that the url isn't re-written. But it does re-write when I actually click it.

That's different than the Contact Us on my site here:

http://www.promdressesforless.us/

I hover on Contact Us just below my logo and I can see the re-written url at the bottom of my screen before clicking on it.

Also, you seem to have the back-button/page not found problem I brought up in the other thread. However, that was for the Chrome browser while yours is doing it in my IE9. I haven't checked other browsers.

Go to your Contacts page then click its blue back button at bottom. My click goes to a page not found instead of homepage or where ever I was.

Same problem with your FAQs. Go to one, then click it's back button.

20 Aug 2012, 11:04 PM
#17
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

Selcyis,

I think I now know what you meant about the two seo files. I just saw, downloaded and installed the upgraded Ultimate SEO from this thread:

http://www.zen-cart.com/showthread.php?199064-Ultimate-SEO-2-200-%28new-features%29

I see the two seo files. Looks like the files to name the box in the admin, so I'm guessing can use one or the other.

Also, I overwrote my older Ultimate SEO files and Ultimate SEO no longer appeared in my admin. Re-uploaded by older Ultimate SEO and got it back into admin, but now site is blank.

And while it was working with the new Ultimate seo, I still had the back button/page not found problem in Chrome browser.

I may nuke promdressesforless.us and start again with a new 1.5 install, as it is mostly a test site anyway.

EDIT: Wait! I just restored a DB with DrByte's DB plugnin from admin and got my site back again, with old Ultimate SEO URL.

http://www.promdressesforless.us/

May pop-up yet another 1.5 test site to test the new Ultimate SEO URL by itself.

24 Aug 2012, 7:40 PM
#18
777imports avatar

777imports

New Zenner

Join Date:
Aug 2012
Posts:
1
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

I am having the same exact problem. Whenever i try to go to my admin console I get the costomer login page. Now i have SEO module and perhaps some new clients, but no way to edit the products. my site is https://www.777imports.com I did try to use the "/" in the httpaccess file, it did not work.

24 Aug 2012, 10:40 PM
#19
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Ultimate SEO .htaccess problem and broken Admin interface

777imports:

I am having the same exact problem. Whenever i try to go to my admin console I get the costomer login page. Now i have SEO module and perhaps some new clients, but no way to edit the products. my site is https://www.777imports.com I did try to use the "/" in the httpaccess file, it did not work.

Your urls are being re-written and from the look of them it looks like you are using the newest Ultimate SEO version 2.200. I also had a problem with it not appearing in my admin, as noted on this thread:

http://www.zen-cart.com/showthread.php?199064-Ultimate-SEO-2-200-%28new-features%29-Support-Thread

I have not yet re-visited this version, so do not know if it is yet fixed.

It turned out that this is the version Selcyis was using.

My testing/demo 1.5 sites are working nicely with the prior version: 2.150. But I found out that going to that version from 2.200 took not only deleting the 2.200 files but a DB restore (hopefully you have one?)

I also noticed that in my IE9 browser you have the back button/page not found problem I mention. Go to product, then Contact Us, then click back button at bottom of Contact Us...goes to page not found for me. Didn't try my Firefox and Chrome.

BTW, nice looking TM site!

27 Aug 2012, 1:24 PM
#20
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ultimate SEO .htaccess problem and broken Admin interface

This should be fixed in version 2.205 and newer. Be advised you should read the Official Ultimate SEO 2.200+ thread. I'll try to respond to any questions, comments, and concerns in that thread when I have time.

However if you ever need to remove all the database changes made by "Ultimate SEO" you can take a look at the function uninstall_settings() found in the file 'seo.install.php'.

Before attempting to uninstall the current or any old versions, you are hereby advised to make a backup of your database. There is a small chance running these commands may break your site as they remove all configuration keys containing the word "SEO".

DELETE FROM `configuration_group` WHERE `configuration_group_title` LIKE '%SEO%';
DELETE FROM `configuration` WHERE `configuration_key` LIKE '%SEO%';
DELETE FROM `admin_pages` WHERE `page_key`='configUltimateSEO';
DELETE FROM `admin_pages` WHERE `page_key`='UltimateSEO';
DROP TABLE IF EXISTS `seo_cache`;

Don't forget you will need to add any "prefix" you have set to the start of the table names.

Why is this function in the installer? If "Ultimate SEO" detects a required table is missing or needs to be updated (typically because of a version upgrade), it will first uninstall old tables and settings to ensure compatibility with the new version. Once it is done uninstalling old settings and tables, it will proceed to install the new tables and settings. This is also why after installing a new version you NEED to always check your settings.