chrometweaks.org

I am using iPage.com to host a website.. HELP?

Click Here To View All Answers...


Got a quick question: I am using iPage.com to host a website.. HELP? Looking forward for any comment. My 2nd question... I have installed a 3rd party iPage site search tool. It consists of a number of files in it's own directory. The path is shop/catalog/search/.

In order to do this, I need to include application_top.php. That file has it's own calls to include other files but the paths are relative and cannot be found since I am calling from a sub-directory.

Any thoughts?.

Jack..

Comments (68)

That's a good question. I'm not sure what is the answer to that question. I'll do some research in Google and get back to you if I got an good answer. You should email the people at iPage as they probably could give you help..

Comment #1

Thanks for that Peter but I didn't explain the problem fully enough I think. You are correct that if I include application_top.php as you show it does get included. The problem is that application_top.php then has includes of it own, like require(DIR_WS_INCLUDES'filenames.php');. That is where the problem is at since the relative path is not inherited. Any ideas?.

Jack..

Comment #2

Hi Jack not sure if it can be done by defining DIR_WS_SEARCH in the configure.php files.

This post has been edited by.

241.

: 29 April 2004, 11:56..

Comment #3

Hi,.

Not too sure if I'm heading down the right path, but there are some pretty tricky things you can do with 'mod_rewrite' in your .htaccess file. For example, I wanted a 'test' osCommerce site, so this:.

# rule to test a 'shop/store' for osCommerce test site.

RewriteCond %{HTTP_HOST} ^(www\.)?mytestsite\.net$ [NC].

RewriteRule !^test/.*$ /test%{REQUEST_URI} [NC,L].

All this does is 'push' the path down one level, to the 'test' path, so maybe it's easy to write a few rule conditions and then do mod_rewrite for your search path ??.

Possibly some rules may work if the user is actually still in the /shop/catalog path, yet the /search path is still totally accessible ??.

Just thinking aloud..

Peter..

Comment #4

Thanks Steve. I added the new define, moved the search.php file to the root and changed the config setings for the search routines. It works like a charm and is fully integrated in my site..

Jack..

Comment #5

I appreciate the suggestion Peter. Unfortunately my host uses IIS (no .htaccess) so I cannot try this fix..

Jack..

Comment #6

I have installed a 3rd party iPage site search tool. It consists of a number of files in it's own directory. The path is shop/catalog/search/. It works great as it is right now but I want to add a few things, like a back button. In order to do this, I need to include application_top.php. That file has it's own calls to include other files but the paths are relative and cannot be found since I am calling from a sub-directory.

Any thoughts?.

Jack..

Comment #7

Hi,.

I hope I have understood your need. If I have a PHP script in my webroot path, then the include is:.

Require('includes/application_top.php');.

And because your search path is already down one level, then all you _should_ need is:.

Require('../includes/application_top.php');.

The first 2 ".." go up one level. I think that is how to do it..

Peter..

Comment #8


This question was taken from a support group/message board and re-posted here so others can learn from it.