Forums / General Questions / To Redirect or .htaccess or not

To Redirect or .htaccess or not

Views: 1,462

Results 1 to 9 of 9
7 Sep 2012, 10:10 AM
#1
dochsa avatar

dochsa

New Zenner

Join Date:
Apr 2008
Location:
United Kingdom
Posts:
62
Plugin Contributions:
0

To Redirect or .htaccess or not

Hi All

I was wondering if you could help me with this conundrum:

Background:
I have the following domain: https://www.assceneon.com and linked it to my hosting account at ipage.com.
I installed Zen Cart in the following folder /catalog

Now I have an issue as I would like that is someone types https://www.assceneon.com they are directed to my \catalog folder as that is where Zen Cart is.

Issue
iPage have the following pointers :

Home Directory (if I use this I get the error Directory has no index file) - But I can still manually type https://www.assceneon.com/catalog and I can use the HOME button and click on the LOGO in the header and it will direct me back to the home page which is https://www.assceneon.com/catalog

Subdirectory: (When I selected this it caused a few issues the pictures were not displayed correctly and also the Home Button and the Logo click did not work and gave a error 404.

URL: tried this too but it cause the site to go down and also it did not allow me to manually get to https://www.assceneon.com/catalog and I am concerned that this will have an impact on the search engine ratings.

The other option that I have is try and create a .htaccess but here I have no experience at all and I am not sure that this will help? But I am able to use this through my control panel at .htaccess editor at iPage: I can use a URL Redirect.

But Im not sure what to put in to the fields:
Redirect this URL:http://example.com/%28Example: directory/file.html indicates http://www.example.com/directory/file.html)
Do I put in "/" as I want it to direct from the root
To this URL:(Example: http://www.example.com/other/directory/file.html)
Do I put in: http://www.assceneon.com/catalog

If I select this what do I then select in the Pointers? I have tried all different combinations and it always seems to bring the site down. I am really am not sure at all what to do here.

iPage have also created a redirect file which is causing hovoc, but I can delete this if needs be.

Any help is appreciated. As I am not sure what is the best solution for Zen Cart... or is there a way to change the 'HOME' button direct and the LOGO direct?

Regards

Donovan

7 Sep 2012, 12:19 PM
#3
dochsa avatar

dochsa

New Zenner

Join Date:
Apr 2008
Location:
United Kingdom
Posts:
62
Plugin Contributions:
0

Re: To Redirect or .htaccess or not

If I wanted to do it another way what would you suggest? Im not really happy with just loading it in the root as we have anumber of other files in the root? Is there another way? Look at what I have written above what would be an alernative to copying to the root?

7 Sep 2012, 12:54 PM
#4
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: To Redirect or .htaccess or not

I don't see any problem with other files, unless you have an index.php, I actually see you don't have any index file anyway in your root.
I don't know what are your other files, but personally I would move zen cart.

Anyhow if you want htaccess check this google
http://www.google.it/search?q=htaccess+redirect+subdirectory+to+root&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:it:official&client=firefox-a

7 Sep 2012, 2:52 PM
#5
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: To Redirect or .htaccess or not

dochsa:

iPage have also created a redirect file which is causing hovoc, but I can delete this if needs be.

Tell me a little more about this file. What's the filename? contents ? location?

It could be very important (or maybe nothing).

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

7 Sep 2012, 3:34 PM
#6
dochsa avatar

dochsa

New Zenner

Join Date:
Apr 2008
Location:
United Kingdom
Posts:
62
Plugin Contributions:
0

Re: To Redirect or .htaccess or not

Hi RodG

It contact a Blank file and a Index file.

8 Sep 2012, 8:16 AM
#7
dochsa avatar

dochsa

New Zenner

Join Date:
Apr 2008
Location:
United Kingdom
Posts:
62
Plugin Contributions:
0

Re: To Redirect or .htaccess or not

Hi all thanks for your help I fixed it. I put a index file in the root and it redirect to the right page.

10 Sep 2012, 10:36 AM
#8
dochsa avatar

dochsa

New Zenner

Join Date:
Apr 2008
Location:
United Kingdom
Posts:
62
Plugin Contributions:
0

Re: To Redirect or .htaccess or not

Hi Rod

Just checking if you can have a look at the below for me.

All I want to have happen is if someone types https://www.assceneon.com it goes to the catalog https://www.assceneon.com/catalog

To Achieve this I have a .htaccess file with the following:

Begin default subdomain redirect

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^assceneon.com [NC]
RewriteRule ^(.*)$ http://www.assceneon.com/$1 [R=301,L]

End default subdomain redirect

I also have a index.html with the following:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>AsSceneOn.com Store</title> <h1>Retro gifts and kitch collectables AsSceneOn TV, Film, Celebrities and Places.</h1> </head> <HTML> <HEAD><META HTTP-EQUIV=Refresh CONTENT="0; url=http://www.assceneon.com/catalog"> </HEAD> </HTML>

And I am getting alot of issues from seacrh engines, how do I fix this?

Any help as alwyas is apprecited.

Dono

10 Sep 2012, 6:13 PM
#9
kobra avatar

kobra

Black Belt

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

Re: To Redirect or .htaccess or not

Having files at the root with your redirect makes them unavailable

I second the suggestion to move your cart to the root

In this way, the SE's will not have issues

Zen-Venom Get Bitten