If this is your first visit, check our documentation. To post, register or login.
Forums / Customization from the Admin / Double slashes in URLs, mod_rewrite at fault?

Double slashes in URLs, mod_rewrite at fault?

Locked

Started by rstevenson on 11 Nov 2006, 1:05 AM · Views: 2,535

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
11 Nov 2006, 1:05 AM
#1
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Double slashes in URLs, mod_rewrite at fault?

Hi,

Today, after a few days working on a Custom template, I decided to try one I downloaded (Wallet) since it was closer to what I wanted than what I'd been working on.

I installed it as instructed and everything seemed fine. Loaded up my site and it looked awful. It appears to be templateless. Just default.

Then I noticed that in the layout boxes controller the addresses of the boxes all have double slashes in them now, like "sideboxes//categories.php". And my site url, both in admin and in my store, also have double slashes now. For example...
https://www.mydomain.com/store//index.php?main_page=product_info&cPath=65&products_id=180

I'm sure this has nothing to do with the template I installed. It didn't require any editiing of files at all. And I took it out without fixing the problem. But what the heck could it be? Everything was fine until I put in the new template and clicked Update.

Any ideas?

Is it possible for a mod_rewrite to be the culprit? I had that put in yesterday so my site would be secure -- now requires https instead of http. Would this upset admin? This was the first serious update (the template install, I mean) since setting up that mod_rewrite.

Here's the rule, in case it matters...
RewriteEngine On
RewriteCond %{HTTP_HOST} https://www.mydomain.com/shop [NC]
RewriteRule ^/(.*)$ https://www.mydomain.com/store [R]

Rob

Breakfast: the most important donut of the day.

11 Nov 2006, 9:29 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Double slashes in URLs, mod_rewrite at fault?

Can not see your problem....url not provided

Zen-Venom Get Bitten

11 Nov 2006, 10:14 AM
#3
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Double slashes in URLs, mod_rewrite at fault?

Breakfast: the most important donut of the day.

11 Nov 2006, 6:31 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Double slashes in URLs, mod_rewrite at fault?

Couple of things....You have not created your own template as the page is using the stylesheet.css from includes/templates/template_default/css/stylesheet.css

It is also not loading a logo.gif and instead is placing the text HEADER_ALT_TEXT in it's place and this normally indicates a error in the editing of one file, leaving out or removing the default text that is there and the pair of single quotes..

Check your includes/languages/english/header.php and look for this in the file and insure that it is exactly as this:

define('HEADER_ALT_TEXT', 'Powered by Zen Cart :: The Art of E-Commerce');
``` Note the single quotes around the text... see if yours is or is not a match for this.

This may or may not also fix the double //'s

Zen-Venom Get Bitten

11 Nov 2006, 7:02 PM
#5
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Double slashes in URLs, mod_rewrite at fault?

Thanks kobra, but the reason you're seeing those things is because of the problem. They didn't cause it, they resulted from it. Until I did that Update for the new template, I had none of these problems. And as the template was just a drop in, with no core files edited, it can't be the problem. It must be something to do with my newly secure site messing up somehow with admin.

I just tried changing my Rewrite rule by dropping the final slash. Sure enough, that got rid of the double slash problem. But unfortunately, the site is still mashed up without a template at all. So...

I went in to my server control panel and commented out the rewrite rule entirely. That got me back a more or less working site. Still some bugs, but I think that has to do with the settings in a header file. I'll go and check permissions for that.

Thanks for trying,

Rob

Breakfast: the most important donut of the day.

16 Nov 2006, 3:33 PM
#6
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Re: Double slashes in URLs, mod_rewrite at fault?

Rob I know you're probably working on your slashes issue, but I am getting a cache error when looking at your site:

1062 Duplicate entry 'zc_3910091ed2bc7ef69f6a9c0293f75d5a' for key 1
in:
[db_cache table]

Try emtpying your db_cache table, or setting your cache to 'file' or 'none' in configure.php. I'd like to offer some more help if I can.

Frank Koehl
"Cleverly Disguised as a Responsible Adult"

frankkoehl.com