The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Creating index page that will direct to two different sites
discking
post Jan 7 2021, 07:08 AM
Post #1





Group: Members
Posts: 7
Joined: 7-January 21
Member No.: 27,714



I'm trying to create a workaround for an issue with an ecommerce package.

I have an Abantecart store at www.elvisstuff.co.uk The store is located in a sub folder. So I have created an index.html page that redirects to this sub folder whenever a customer uses the www.elvisstuff.co.uk URL.

Abantecart has a feature whereby I can create multiple stores with just one back office. However, despite numerous attempts, I can't get it to work as it should. I have sought help of the Abantecart forums and even got a specialist to look at it and he couldn't help either. (I suspect it might be a hosting issue but can't be sure)

So I'm trying to create a workaround.

The new store uses the URL www.andrewsstuff.co.uk and works perfectly fine as long as the customer prefaces the URL with HTTPS:// However I don't expect all customers will do this. Without the preface the site defaults to the elvisstuff site.

Can I/How do I create one index.html file that will direct customers to one site if they type www.elvisstuff.co.uk and another site if they type www.andrewsstuff.co.uk ?

The code I am currently using to direct to elvisstuff is:


<title>www.elvissstuff.co.uk</title>
<font size="2" face="Arial, Helvetica"><meta
HTTP-EQUIV="REFRESH" content="0;
url=https://www.elvissstuff.co.uk/shop/index.php"></font>

Any help is greatly appreciated.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 7 2021, 08:23 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



QUOTE(discking @ Jan 7 2021, 01:08 PM) *



The new store uses the URL www.andrewsstuff.co.uk and works perfectly fine as long as the customer prefaces the URL with HTTPS://


Nuh. https://www.andrewsstuff.co.uk also redirects to https://www.elvissstuff.co.uk/shop/index.php. Which page doesn't exist BTW.

I think you'll just make it worse with workarounds. This happens for a reason. Do you have an .htaccess file? I have a feeling you do and that you have a redirect in there that's been copied from one place to another and causes all this. Ot that it's too written in such a way that it catches everything.

Is the andewstuff domain in it's own folder parallel to elvisstuff?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 7 2021, 08:34 AM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Ot maybe it's just your Meta Refresh tags.

In the andrewstuff.co.uk/index.html you have this.
CODE
<font size="2" face="Arial, Helvetica"><meta HTTP-EQUIV="REFRESH"content="url=https://www.elvissstuff.co.uk/shop/index.php"></font>

That redirects to https://www.elvissstuff.co.uk/shop/index.php not andrewstuff.co.uk/shop/index.html as you said.

Now I can't go to elvissstuff.co.uk at all for some reason, but my guess is you have other meta refreshes in the other pages and they're sort of mixed up.

Side note: those font tags have nothing there to do. You can't have FONT in HEAD.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
discking
post Jan 7 2021, 08:42 AM
Post #4





Group: Members
Posts: 7
Joined: 7-January 21
Member No.: 27,714



Thanks for getting back to me so quickly, pandy. The elvisstuff site was working until I started messing with it Lol. I try to fix one problem and create another. I do have an .htaccess file but I've no idea what to do with it.

The andrewsstuff domain is domain mapped to elvisstuff and as such doesn't have a folder at all. I think the site is databased constructed.

The files are under elvisstuff and the database reads that the direct is from andrewsstuff and reads a different set of components to build the site.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
discking
post Jan 7 2021, 09:15 AM
Post #5





Group: Members
Posts: 7
Joined: 7-January 21
Member No.: 27,714



I figured out why elvisstuff.co.uk wasn't working - I managed to stick an extra "s" in the middle on the index.html redirect. It works now.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 7 2021, 12:07 PM
Post #6


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Right! But you didn't want andrewstuff to redirect to elvisstuff, did you?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
discking
post Jan 7 2021, 12:11 PM
Post #7





Group: Members
Posts: 7
Joined: 7-January 21
Member No.: 27,714



No. I want www.andrewsstuff.co.uk to redirect to www.andrewsstuff.co.uk/shop/

Is it possible to get one index page to direct one URL to one place and a second URL to another? If so how do I write the code?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 7 2021, 12:14 PM
Post #8


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



QUOTE(discking @ Jan 7 2021, 06:11 PM) *

No. I want www.andrewsstuff.co.uk to redirect to www.andrewsstuff.co.uk/shop/

Is it possible to get one index page to direct one URL to one place and a second URL to another? If so how do I write the code?


I don't understand. Have you pointed both domains to the same folder? Do they share the index page? That doesn't work.

Point each domain to it's own folder. Then redirect accordingly.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
discking
post Jan 7 2021, 12:25 PM
Post #9





Group: Members
Posts: 7
Joined: 7-January 21
Member No.: 27,714



Yes both domains point to the same folder because that's the way the ecommerce software works. It points all the different domains to the same place and then the database takes over. It identifies which domain has been used and then configures the site accordingly. As the original site was installed into a sub folder the database is looking in the root folder. This wasn't a problem when I had just one store as I created an index page that redirected to the subfolder. However now I have created a second store the redirect still directs to the original store. The database doesn't recognise that the redirect is coming from another URL so configures the original store. I'm hoping that I can get some code that tells the database that a different URL has been used and to configure the store for that URL and not the original one.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 7 2021, 12:28 PM
Post #10


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



I didn't get half of that but it sounds totally crazy to me.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 7 2021, 01:22 PM
Post #11


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Anyhow, you must have some kind of template for each index page. And the redirection you have put in the andrewstuff one goes to the elvisstuff one. So change that to begin with.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
discking
post Jan 7 2021, 03:05 PM
Post #12





Group: Members
Posts: 7
Joined: 7-January 21
Member No.: 27,714



It looks like I'm not going to be able to do it. The template doesn't have a redirection. The only place for a URL is already set up with the respective URLs I'm trying to get to work. Thanks for your help though.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 7 2021, 06:03 PM
Post #13


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



You must have written that Meta refresh tag somewhere. It didn't write itself. So go to the same place and change it to the right URL. That's a starting point anyway.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
discking
post Jan 8 2021, 07:04 AM
Post #14





Group: Members
Posts: 7
Joined: 7-January 21
Member No.: 27,714



I've managed to achieve what I wanted to do without using html. Thank you, pandy for your input. Your help is appreciated.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 05:46 AM