Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

domain name issue


leekenie

Recommended Posts

Posted

Hello!

I am a really noob to oscommerce. I have read a lot of useful tips and guides and they helped me a lot. Thanks guys!

 

But now I have one problem that couldn't be fixed.

 

Our site was designed by another person and used oscommerce 2.x.

After the person finished building it, I had to modify, re-design and manage. I had never heard of .php before then. Sorry for my ignorance. But I did some research and learned from you guys, so I was be able to manage the site.

 

Only issue I'm having right now is, people have to type "http://www.damain.com" to open our site. If they type "http://domain.com", it will not open or search engines(google yahoo ...) can't even find the site.

 

I talked to the persn who designed the site about the issue but she told me to call my host company to resolve the issue. And when I called the host company, they said that since it was designed with .php, they can't do anything and asked me to tell the person who built the site. and back and forth...... DAMN!!!

 

I search the oscommerce site for weeks but couldn't find the right answer.

Can someone give me a direction or where I can make a change to resolve this issue?

 

I really appreciate in advance!

 

One of these days, I will try to install 3.x by myself... God help me....

Posted

I talked to the persn who designed the site about the issue but she told me to call my host company to resolve the issue. And when I called the host company, they said that since it was designed with .php, they can't do anything and asked me to tell the person who built the site. and back and forth...... DAMN!!!

Your host company is full of it. This is a hosting issue, not a PHP issue. You may want to start looking around for a possible new host, if they continue to refuse to support you. Your site designer isn't especially helpful, either.

 

Only issue I'm having right now is, people have to type "http://www.damain.com" to open our site. If they type "http://domain.com", it will not open or search engines(google yahoo ...) can't even find the site.

That's unusual. A properly set up hosting system should respond to domain.com and www.domain.com. Either your server is misconfigured, or you have something breaking "domain.com". Is this a Linux + Apache server? If so, what's in your .htaccess file(s)? --- out anything sensitive such as account names, before posting here. It's possible that someone attempted to redirect domain.com to www.domain.com, and botched the job. If there's nothing in the .htaccess file(s) for URL rewriting, go back to your host (who are they?) and ask them why domain.com isn't recognized. Maybe some doofus who didn't know what they were doing was messing around in your site's root directory and erased something they shouldn't have?

 

If it's a Windows + IIS server, I have no idea what to do about this. You're in the hands of your host.

Posted

Thank you so much for the reply.

Our host company is hostway.com and we are using Linux server.

And I believe that the guy from host company told me that our domain is re-directed and he told me to tell the designer to fix that issue as I said before.

 

I was looking for .htaccess file but can't locate where it is. Can you tell me which folder I have to look in?

Thank you again!

 

Sorry I found the file.

# $Id: .htaccess 1739 2007-12-20 00:52:16Z hpdl $

#

# This is used with Apache WebServers

#

# For this to work, you must include the parameter 'Options' to

# the AllowOverride configuration

#

# Example:

#

# <Directory "/usr/local/apache/htdocs">

# AllowOverride Options

# </Directory>

#

# 'All' with also work. (This configuration is in the

# apache/conf/httpd.conf file)

 

# The following makes adjustments to the SSL protocol for Internet

# Explorer browsers

 

#<IfModule mod_setenvif.c>

# <IfDefine SSL>

# SetEnvIf User-Agent ".*MSIE.*" \

# nokeepalive ssl-unclean-shutdown \

# downgrade-1.0 force-response-1.0

# </IfDefine>

#</IfModule>

 

# If Search Engine Friendly URLs do not work, try enabling the

# following Apache configuration parameter

 

# AcceptPathInfo On

 

# Fix certain PHP values

# (commented out by default to prevent errors occuring on certain

# servers)

 

# php_value session.use_trans_sid 0

#php_value register_globals 1

#php_flag register_globals on

 

It looks like it's not configured yet?!?! And I don't see any user info or am I missing something?

As I said that I am a noob to this. Sorry for asking all these questions...

I really appreciate your help.

Posted

Well, that looks like the .htaccess from the store's root directory. It's still shrinkwrapped (nothing has been uncommented), so it does nothing. Is your store installed in your site root (http://www.yourdomain.com/) -- if not, what is the .htaccess in your site root? Are there any directories between the site root and the store's root directory (e.g., http://www.yourdomain.com/something/other/store/ is the store)? If so, what are those .htaccess files (if any)?

 

If we can't find an .htaccess file somewhere above the store, that's doing redirection, you'll have to ask your host where they found the redirection. It could be a faulty setup on their part, but first you have to prove that you have no .htaccess files doing redirection.

Posted

Well, that looks like the .htaccess from the store's root directory. It's still shrinkwrapped (nothing has been uncommented), so it does nothing. Is your store installed in your site root (http://www.yourdomain.com/) -- if not, what is the .htaccess in your site root? Are there any directories between the site root and the store's root directory (e.g., http://www.yourdomain.com/something/other/store/ is the store)? If so, what are those .htaccess files (if any)?

 

If we can't find an .htaccess file somewhere above the store, that's doing redirection, you'll have to ask your host where they found the redirection. It could be a faulty setup on their part, but first you have to prove that you have no .htaccess files doing redirection.

I looked every where but that's the only .htaccess file I can find. I don't think it is installed on our server. Only thing I see is www file which opens to oscommerce files but it is not a folder.

 

I will contact the host and will see if anyone(if there is anyone who knows what they are doing) can help me with this.

Thanks a million and will let you know the outcome.

Posted

Hello!

I am a really noob to oscommerce. I have read a lot of useful tips and guides and they helped me a lot. Thanks guys!

 

But now I have one problem that couldn't be fixed.

 

Our site was designed by another person and used oscommerce 2.x.

After the person finished building it, I had to modify, re-design and manage. I had never heard of .php before then. Sorry for my ignorance. But I did some research and learned from you guys, so I was be able to manage the site.

 

Only issue I'm having right now is, people have to type "http://www.damain.com" to open our site. If they type "http://domain.com", it will not open or search engines(google yahoo ...) can't even find the site.

 

I talked to the persn who designed the site about the issue but she told me to call my host company to resolve the issue. And when I called the host company, they said that since it was designed with .php, they can't do anything and asked me to tell the person who built the site. and back and forth...... DAMN!!!

 

I search the oscommerce site for weeks but couldn't find the right answer.

Can someone give me a direction or where I can make a change to resolve this issue?

 

I really appreciate in advance!

 

One of these days, I will try to install 3.x by myself... God help me....

 

Can't help you much unless you tell us the real name of the domain. When a domain name is received it virtually does nothing. You then have to set up DNS entries to 'point' your domain name to your host. It is at this point that you have to set domain_name.com and www.domain_name.com to BOTH point to your host. It is a DNS issue at this point, not a host issue.

 

Then, once the request gets to your host, the server configuration must accept the request for both domain_name.com and www.domain_name.com and serve your pages. At THIS point it IS a host issue.

 

On a command line ping www.your_domain_name.com and see if you get a response. You should your domain's ip address and ping responses.

On a command line ping your_domain_name.com and see if you get a response. If you see the translation to IP numbers but do not get a response then it is a host issue. If you get your_domain_name.com not found then it is a DNS issue and you need to find out who manages your dns and have it corrected.

 

 

It is not a matter of 'properly set up' but a matter of 'preferences.'

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Posted

Thanks mdtaylorlrim!

 

I pinged both www.domain.com and domain.com and got the exactly same response from both.

So what should do now?

According to your reply, if I didn't get a response or not found then it's either dns or host issue, but I am getting the same response and found both?!?!

 

It is really making me confused???

 

Thank you for your help though.

 

And my site is, www.pertutti.com just in case if this can be helped.

Posted

Thanks mdtaylorlrim!

 

I pinged both www.domain.com and domain.com and got the exactly same response from both.

So what should do now?

According to your reply, if I didn't get a response or not found then it's either dns or host issue, but I am getting the same response and found both?!?!

 

It is really making me confused???

 

Thank you for your help though.

 

And my site is, www.pertutti.com just in case if this can be helped.

At this point you know with certainty that your DNS is configured for both and it IS a hosting company issue. Now, your hosts server config must be correctly configured to recognize both the domain (pertutti.com) and the www machine, www.pertutti.com. This is done in the httpd.conf file at your host company. You need to tell them to setup your domain so that the seerver name is pertutti.com and the server alias is www.pertutti.com

 

That way your pages will be served using either method.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Posted

Thank you so much for your advice.

I will definately call them and tell them what you posted.

 

Anyway, what do you think about our site? Do you have any suggestions on anything?

The person who built the site did most of the layout but I had to change layout, colors and other menu bars and changed buttons with my design. And added html pages for some pages as well.

Any suggestions will be appreciated.

Posted

When I access http://www.pertutti.com, it works fine. When I attempt to access http://pertutti.com, Firefox reports:

The page isn't redirecting properly

 

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

 

* This problem can sometimes be caused by disabling or refusing to accept

cookies.

This is usually a sign that .htaccess is improperly set up, and causing a loop. You say that you've checked for .htaccess files everywhere in your site and there's nothing. I also don't see any <meta> tag "refresh" on your index.php tag that would be sending you in a loop. In that case, it must be some sort of problem on your host's end, such as their internal DNS. I'm not aware of anything else you could be doing that would cause such a problem, unless your site has some extra header("Location: xxxxxxx"); statements that are doing some kind of strange redirection from within PHP.

 

If it is something on your end, your host at least needs to tell you where the problem is, even if they're not obligated to fix it.

Posted

Ok, I finally looked at your site and get the same results as MrPhil, but went a step further. I went to http://pertutti.com/stylesheet.css and got a perfect page.

 

So, your problem is not a host issue unless they are doing something in the httpd.conf file that does redirects instead of aliasing for virtual domains. I would ask them if they have any other customers using OSC and if anyone else has any problems.

 

.htaccess files are not always visible. The "." before the file name is what causes linux to not display the file using the standard ls (dir) command. You have to use ls -Al to see the files preceeded by a period. However, cPanels will see these files and I don't know what you are using to look into your directory structure. But, most normal FTP programs will not see them.

 

I think now that there is some rewrite rule with an error that is causing the problem. .htaccess is the most likely place.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Posted

It's interesting that when I go to http://pertutti.com/specials.php OR http://www.pertutti.com/specials.php the result is:

 

"No input file specified."

 

That's a little suspicious to me....

 

I would have a look at the code in that file as well as the index.php file. Maybe copy the top 20 lines or so of each file here and lets all have a look at it to help you out.

 

 

I'd hate to jump right to 'you've been hacked' but someone could have placed a rewrite rule in your .htaccess file that redirects pages without the www to a file uploader...

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Posted

Thank you mdtaylorlrim!

I was trying to see the files through cPanels but hostway.com cpanel is horrible unless I'm missing something.

Only way to look at files is through FTP which they provide. However, it never works. it just freezes the browser and doesn't go anywhere. So I had to use a third party FTP software to check.

 

I have used 2 different FTP software but, as you said, couldn't find .htaccess file other than what I gave to MrPhil.

 

I really hope the site is not hecked....

Here are index.php and special.php:

 

index.php

<?php

require('includes/application_top.php');

 

// the following cPath references come from application_top.php

$category_depth = 'top';

if (isset($cPath) && tep_not_null($cPath)) {

$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

$cateqories_products = tep_db_fetch_array($categories_products_query);

if ($cateqories_products['total'] > 0) {

$category_depth = 'products'; // display products

} else {

$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");

$category_parent = tep_db_fetch_array($category_parent_query);

if ($category_parent['total'] > 0) {

$category_depth = 'nested'; // navigate through the categories

} else {

$category_depth = 'products'; // category has no products, but display the 'no products' message

}

}

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<meta name="description" content="Pertutti New York provides luggage, handbags, men's bags, laptop bags, leather and travel accessories." />

<meta name="keywords" content="tumi, longchamp, swiss army, victorinox, rimowa, jack gomme, briggs and riley, jfold, sequoia, tucano, texier, luggage, handbags, messenger bags, laptop bags, leather accessories, travel accessories" />

 

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

 

 

<!-- popup window -->

<script type="text/javascript" src="javascripts/prototype.js"> </script>

<script type="text/javascript" src="javascripts/effects.js"> </script>

<script type="text/javascript" src="javascripts/window.js"> </script>

<script type="text/javascript" src="javascripts/window_effects.js"> </script>

<script type="text/javascript" src="javascripts/debug.js"> </script>

<link href="themes/default.css" rel="stylesheet" type="text/css"/>

<script language="JavaScript" type="text/javascript">

function openProduct(file) {

Dialog.info({url: file, options: {method: 'get'}}, {className: "default", width:560, height:450});

}

</script>

 

<link rel="shortcut icon" href="favicon.ico" >

 

</head>

 

special.php

<?php

/*

$Id: specials.php,v 1.49 2003/06/09 22:35:33 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SPECIALS);

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SPECIALS));

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

 

<!-- popup window -->

<script type="text/javascript" src="javascripts/prototype.js"> </script>

<script type="text/javascript" src="javascripts/effects.js"> </script>

<script type="text/javascript" src="javascripts/window.js"> </script>

<script type="text/javascript" src="javascripts/window_effects.js"> </script>

<script type="text/javascript" src="javascripts/debug.js"> </script>

<link href="themes/default.css" rel="stylesheet" type="text/css"/>

<script language="JavaScript" type="text/javascript">

function openProduct(file) {

Dialog.info({url: file, options: {method: 'get'}}, {className: "default", width:560, height:450});

}

</script>

<link rel="shortcut icon" href="favicon.ico" >

 

</head>

 

Didn't know how much you need to see, so just copied upto </header> on each file.

 

I really appreciate your help.

 

I will check and see if there are other ways to see files or hidden files on our server.

Posted

Well there are many others that have the more specialized experience that I do not have so admittedly this is now getting out of my realm. But, I have no popup window codes in any of my files, but that may have been added by a legitimate add-on that i am not aware.

 

The next 20 lines would help as that gets into the body of the pages. Beyond that hopefully someone else will see something.

 

Did you look in all the directories for an htaccess file? It could be in any of them accessed by a call from the index.php file. Includes, boxes, languages, english, etc.

 

 

Edited to add: Your site is also set to do ssl for your entire site using https://www.pertutti.com Chances now are that the rewrite rules the redirects users to the secure connection is not working right. Check your configure.php files in both your catalog and admin directories.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Posted

Thank you!

 

I will look again if I missed anything later.

have to do something else right now so I will post if I find it.

 

Thank you again!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...