Redirect URL


#1

I want my users to go to www.natelandcompany.com/catalog when they type in www.natelandcompany.com. How do I set this up?


#2

Create a htaccess file. This is a text file which the filename starts with a period. After you save the file on your system as say text.htaccess, after you upload the file just rename it to .htaccess. The reason to do this is some operating systems like Windows XP does not support file names starting with a period.

In the file just type,

Redirect permanent /index.html http://www.natelandcompany.com/catalog/index.html

The first name can be relative but the last name has to be absolute and there is a space between the two names.
If your index uses a different extention such as php then just make the changes to the above.
Hope this helps,
BTW there is now an option in the control panel to create an htaccess, look it over and see if it can help. Though I beleive you will end up using the above.
Silk

My website


#3

Was/is there a reason you did not/cannot just install oscommerce in your natelandcompany.com directory? That is the considerably better way to do it, as it avoids any redirects or potential .htaccess rewrite rule conflicts.

You could always put a permanent redirect in an .htaccess file in thenatelandcompany.com directory sending the user to natelandcompany.com/catalog, but I have no idea how/if that may have unintended consequences with the oscommerce rewrite rules (it shouldn’t, but you never know and I have no oscommerce installation right at present to explore).

–rlparker


#4

Yeah, I don’t believe the panel .htaccess tool builds redirects (just authentication and hotlink protection, IIRC) .

–rlparker


#5

It would be better to use

Redirect permanent /index.html http://www.natelandcompany.com/catalog/

without the “index.html” at the end; it’s generally cleaner to avoid specifying particular default index filenames. But do include the trailing slash if it’s a subdirectory name to avoid an extra server redirect from the slashless URL.

– Dan