Thread: Wrong URL...

Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    Jan 2008
    Posts
    43
    Plugin Contributions
    0

    Default Re: Wrong URL...

    Well I thought I was done but it has not worked and the URL still shows as bad. I really need this to be fixed or I might have to gut it. Would prefer not to do that. The DNS thing above wasn't the issue, nothing has been fixed. Picandnix follow the link to blackwidowarms.com and then click on a link in the site and you'll see what I mean.....

  2. #12
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Wrong URL...

    Quote Originally Posted by micro007 View Post
    Well I thought I was done but it has not worked and the URL still shows as bad. I really need this to be fixed or I might have to gut it. Would prefer not to do that. The DNS thing above wasn't the issue, nothing has been fixed. Picandnix follow the link to blackwidowarms.com and then click on a link in the site and you'll see what I mean.....
    That issue seems to possibly something in your configure.php or if you have another uri rewriter. Every link goes somewhere "unexpected" and I thought that those links are generated off of the ZC code, so the redirect gets there, but then tries to send you off somewhere else. :/
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #13
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Wrong URL...

    Quote Originally Posted by micro007 View Post
    I basically installed Zen Cart on the server added a couple of addons and redid the graphics. Configured all the necessary files per the template instructions and added HTML redirects to point to the sub-domain of the parent directory which is setup through the CP Panel of my hosting company.
    If you've set up the domain correctly there will be no need for any redirects. Redirects are bad, m'ok.

    Quote Originally Posted by micro007 View Post
    So I have an HTML Redirect and a CP Panel URL redirect that dumps you right from http://www.blackwidowarms.com to https://store.blackwidowarms.com this works perfectly in all browsers. I've ensured that the configure.php is as follows -
    A redirected redirect. Doesn't get much messier than that. I dread the day you decide that 'SEO rewrites' are a good thing.

    Quote Originally Posted by micro007 View Post
    Code:
    define('HTTP_SERVER', 'http://store.blackwidowarms.com');
    define('HTTPS_SERVER', 'https://store.blackwidowarms.com');
    
    define('DIR_WS_CATALOG', '/');
    define('DIR_WS_HTTPS_CATALOG', '/');
    
    define('DIR_FS_CATALOG', '/home/content/**/*******/html/store/');
    Is this the same in *both* of the configure.php files? I'm guessing that one of them still holds the data for bangorang.com

    Quote Originally Posted by micro007 View Post
    If you get to https://store.blackwidowarms.com from anywhere then click on a link within the website it takes you to my main account domain and then mydomain.com/store which is where the files for zen cart sit. No secured link or anything. I've talked to the hosting company and they have no clue! Please tell me I don't have to gut and start over.... everything works and things can be ordered. My entire domain has a SSL cert so I'm not worried about that. I just need the links to show his business! I haven't done too much database programming but I can get in there if anyone thinks that this might be where the problems is. Any help would be appreciated.....
    This will have nothing to do with the Database. It is a configuration issue that has been compounded by having a redirect where its not needed (cpanel) plus one or more other redirects (also probably not needed) that have been put in place (I assume) to try to overcome the problem with the zencart configure.php settings.

    A correctly configured website (zencart or otherwise) has no need for a redirect at any time. These things (redirects) should only be used for their intended purpose, which is to *redirect* the URL of an *original* website to the *equivalent* URL of a relocated website (such as if/when the original site has been relocated to a different domain. If you get rid of all of your redirects and set the DNS and Website up without using them, you'll find most, if not all of your problems will simply vanish.

    Redirects are bad, m'ok.

    Cheers
    RodG

  4. #14
    Join Date
    Jan 2008
    Posts
    43
    Plugin Contributions
    0

    Default Re: Wrong URL...

    Okay, if I'm understanding you correctly, my problem is with the redirects? The site name is registered with another company and points to my server. I have all of my hosted domains sitting under my main domain. When I built the store I built it in the store directory under the main domain directory so I could make sure it was secure before going live. It was not built in the blackwidowarms directory. So, I used a redirect from the blackwidowarms directory to the store directory when it went live. The redirects do exactly what their suppose to do....

    It's when you get there and click on something and it changes the url in the browser to read maindomain/store.....

    Have I done this wrong? It worked on the last site I built.... I understand I might be wrong and really would appreciate any continued help.

  5. #15
    Join Date
    Jan 2008
    Posts
    43
    Plugin Contributions
    0

    Default Re: Wrong URL...

    Quote Originally Posted by micro007 View Post
    Okay, if I'm understanding you correctly, my problem is with the redirects? The site name is registered with another company and points to my server. I have all of my hosted domains sitting under my main domain. When I built the store I built it in the store directory under the main domain directory so I could make sure it was secure before going live. It was not built in the blackwidowarms directory. So, I used a redirect from the blackwidowarms directory to the store directory when it went live. The redirects do exactly what their suppose to do....

    It's when you get there and click on something and it changes the url in the browser to read maindomain/store.....

    Have I done this wrong? It worked on the last site I built.... I understand I might be wrong and really would appreciate any continued help.


    Since the above I found another configure file in the admin directory that had maindomain.com in it. Changed it but it still shows wrong is there a cache I need to dump or something. I deleted browser history but ti still is coming back as maindomain.com/store.....

  6. #16
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Wrong URL...

    Quote Originally Posted by micro007 View Post
    Since the above I found another configure file in the admin directory that had maindomain.com in it. Changed it but it still shows wrong is there a cache I need to dump or something. I deleted browser history but ti still is coming back as maindomain.com/store.....
    Must be a cache issue. When I go to blackwidowarms.com I'm ending up on http://store . blackwidowarms . com/

    Is that what you are after, or do you want it to appear as http://blackwidowarms . com/ or perhaps http://www . blackwidowarms . com/ ?

    Cheers
    RodG

  7. #17
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Wrong URL...

    Quote Originally Posted by micro007 View Post
    Okay, if I'm understanding you correctly, my problem is with the redirects?
    Yes, it *could* be due to redirects, but no, you didn't quite understand what I was trying to tell you.

    The point I was trying to make is that you are needlessly using redirects and that can only complicate matters for you. It's like putting up several detours where none are needed. At the end of the day if all the detours are correct you'll eventually end up at the correct destination, but it is far better to take the more direct route.

    Quote Originally Posted by micro007 View Post
    The site name is registered with another company and points to my server.
    This is essentially true of nearly all websites. The only exceptions are if the domain registrars also provide hosting services (many don't). On the flip side, most web hosts will also provide registration services but only by registering the domains on the clients behalf with an ICANN accredited registrar.
    There are many 1000's (perhaps millions) of 'Webhosts' out there, but the number of registrars can be counted in the hundreds.

    Quote Originally Posted by micro007 View Post
    I have all of my hosted domains sitting under my main domain.
    I understand what you are saying, but this technically isn't the case. What you have is all of your domains managed by a single user *account*. A user account and a domain name are not the same thing, but most hosts tend to muddy the waters a little by assigning the 1st domain name setup as being the account name.

    Quote Originally Posted by micro007 View Post
    When I built the store I built it in the store directory under the main domain directory so I could make sure it was secure before going live. It was not built in the blackwidowarms directory. So, I used a redirect from the blackwidowarms directory to the store directory when it went live. The redirects do exactly what their suppose to do....
    That will work (as you know), but a far *better* way of achieving the desired results WITHOUT having to use a redirect would be to set the Document Root of any given domain to match where the site files actually reside.
    IOW, if you have somedomain.com having its document root at /filepath/filepath/public_html/ and you develop the site by placing the files in /filepath/filepath/public_html/store/ and later decide you want people to find the site at "somedomain.com" instead of "somedomain.com/store" instead of doing a redirect, just change the document root for somedomain.com from /filepath/filepath/public_html/ to /filepath/filepath/public_html/store/ and you'll acheive the same results without having to redirect the browser.
    Not only do redirects complicate matters in regards to where the client finally ends up, they also come at a performance cost as the customers web browser has to 'navigate' the redirects.
    Redirected sites also tend to get lower search engine rankings.

    Quote Originally Posted by micro007 View Post
    It's when you get there and click on something and it changes the url in the browser to read maindomain/store.....
    This will be because ZenCart creates the URL's dynamically, based on the settings in its configuration.php files. There are two of these files, one for the store itself, the other for the admin section of the store.

    Quote Originally Posted by micro007 View Post
    Have I done this wrong? It worked on the last siteI built.... I understand I might be wrong and really would appreciate any continued help.
    I won't go as far to say that you've done it wrong, after all, if it works, then by definition it must be right. It's just that like most things relating to computers there are often many ways of achieving the same end results. It is just that the redirect method is quite inefficient (compared to ending up at the same place without using redirects), and if you then start redirecting something that has already been redirected it is far too easy to make mistakes and causing endless loops (redirect on site 'A' points to site 'B' that redirects back to site 'A' ad infinatum).

    Hopefully this has helped clarify rather than confuse, but if I have managed to confuse you, then please feel free to ignore all of this and just do what works for you. You are not alone in jumping onto the 'redirect solution' rather than the document root solution, in fact you are quite probably one of the majority. However, if you want further clarification about any of this don't be afraid to ask.

    Cheers
    RodG

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v138a Wrong URL after transfer
    By John1983 in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 21 Mar 2012, 10:32 PM
  2. wrong url
    By Ivanna in forum General Questions
    Replies: 6
    Last Post: 2 Mar 2012, 12:39 AM
  3. Wrong Url coming up
    By autoace in forum Installing on a Linux/Unix Server
    Replies: 13
    Last Post: 10 Oct 2010, 03:41 AM
  4. Category URL is wrong
    By lord_k3y in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 10 May 2010, 03:46 PM
  5. Wrong Admin URL
    By KTNaturals in forum Basic Configuration
    Replies: 3
    Last Post: 11 Nov 2007, 10:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR