Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Mobile Marketing (https://www.warriorforum.com/mobile-marketing/)
-   -   php mobile page linking to html index (https://www.warriorforum.com/mobile-marketing/463445-php-mobile-page-linking-html-index.html)

godinu 3rd October 2011 03:08 PM

php mobile page linking to html index
 
i'm using mobile templates based on php (will's), but purchased business cards ahead of time with a QR code on them linking to a future mobile site of my own with an index.html (rather than .php) page because i didn't know I would be using php even for the main mobile page. Do i need to do a redirect from the index.html page to display the .php index of the mobile site?


(in other words: mobile user scans my QR code to see what a mobile site is. It takes them to an index.html page which is supposed to be a mobile version of my site, but my mobile site is .php... redirect index.html to index.php? will it work properly on a phone?)

imarketstuff 3rd October 2011 05:16 PM

Re: php mobile page linking to html index
 
hey there godinu

u have a few options:

1. create an index.html with a (meta refresh) to the index.php
2. copy index.php to index.html, and make sure your server parses php in .html files
3. create a symbolic link file (index.html) that points to index.php

the meta refresh option is the least painful ;)

Patrick

WillR 3rd October 2011 07:40 PM

Re: php mobile page linking to html index
 
Quote:

Originally Posted by imarketstuff (Post 4803414)
hey there godinu

u have a few options:

1. create an index.html with a (meta refresh) to the index.php
2. copy index.php to index.html, and make sure your server parses php in .html files
3. create a symbolic link file (index.html) that points to index.php

the meta refresh option is the least painful ;)

Patrick

They are all good options above. My comments however would be:

1) Why did you include the index.html file in your QR code url? Why did you not just link to the root of your mobile site domain such as m.website.com instead of having it link to m.website.com/index.html?

2) If you are going to be having a QR code printed on to something which means you won't be able to change that QR code for sometime, you might want to consider linking the QR code to a url forwarding/redirect service. That way you can always change the destination url if you need to.

godinu 3rd October 2011 07:46 PM

Re: php mobile page linking to html index
 
I did it this way because I am just starting my business and haven't yet designed my website, but i had to get my QR-coded business cards made today so i could have them for a networking event. I had to take a stab at a URL I could live with, so I assumed it would be an index.html. This is just for a sample mobile site (my own) that will link from my business card QR code. I should've went through the mobile template first but just simply ran out of time.

Quote:

Originally Posted by WillR (Post 4803997)
They are all good options above. My comments however would be:

1) Why did you include the index.html file in your QR code url? Why did you not just link to the root of your mobile site domain such as m.website.com instead of having it link to m.website.com/index.html?

2) If you are going to be having a QR code printed on to something which means you won't be able to change that QR code for sometime, you might want to consider linking the QR code to a url forwarding/redirect service. That way you can always change the destination url if you need to.


WillR 3rd October 2011 08:07 PM

Re: php mobile page linking to html index
 
Quote:

Originally Posted by godinu (Post 4804015)
I did it this way because I am just starting my business and haven't yet designed my website, but i had to get my QR-coded business cards made today so i could have them for a networking event. I had to take a stab at a URL I could live with, so I assumed it would be an index.html. This is just for a sample mobile site (my own) that will link from my business card QR code. I should've went through the mobile template first but just simply ran out of time.

Yes, but do you understand what I mean?

The index file of a website, whether it is html or php, is the page that will always be served up when you type in that domain name. So let's say I typed in your mobile site http://m.website.com it is going to take me to the index file of that domain, whether it is index.html or index.php

You don't see people advertising their websites on television like this: http://www.website.com/index.html

You don't include the index.html or index.php in the domain url because there is no need to. Whether or not your mobile site has an index.html file or an index.php file as the main page, it will still be that page that shows up to anyone who types in the main domain such as http://www.website.com or http://m.website.com

MUNK26 3rd October 2011 09:06 PM

Re: php mobile page linking to html index
 
One suggestion would be that you could do a 304 redirect in your hosting account, meaning that you can have your site redirect from the site.html to site.php. Hope that helps.

godinu 4th October 2011 01:17 PM

Re: php mobile page linking to html index
 
re: will's comment: yes i do understand completely what you mean and have not listed the URL anywhere; it's simply where the qr code leads. I am not sure why i made a goofy url the way i did -- sleep deprivation I suppose. I know better but now am trying to fix it.

WillR 4th October 2011 07:54 PM

Re: php mobile page linking to html index
 
Quote:

Originally Posted by godinu (Post 4808812)
re: will's comment: yes i do understand completely what you mean and have not listed the URL anywhere; it's simply where the qr code leads. I am not sure why i made a goofy url the way i did -- sleep deprivation I suppose. I know better but now am trying to fix it.

No problems - I just wanted to make sure you were aware of how to properly link to urls. We all make mistakes, just a shame it was on a printed material!

Quentin 4th October 2011 09:08 PM

Re: php mobile page linking to html index
 
Another way to overcome this would be to add a great offer to your index html page and then have a link to the php site.

http://squeezemobi.com/images/squeez...ding-pages.png

Q

godinu 4th October 2011 10:19 PM

Re: php mobile page linking to html index
 
true... i was going to use that particular qr code-linked page to show potential clients how a mobile site works from my phone though. that page i'm talking about is meant just for mobile viewing.

Quote:

Originally Posted by Quentin (Post 4811016)
Another way to overcome this would be to add a great offer to your index html page and then have a link to the php site.

http://squeezemobi.com/images/squeez...ding-pages.png

Q


godinu 4th October 2011 10:20 PM

Re: php mobile page linking to html index
 
btw quentin, i love those offer mockups! are u offering such templates in another thread? I've read a lot of your posts and learned a lot. hadn't noticed those though!

WillR 4th October 2011 11:45 PM

Re: php mobile page linking to html index
 
Quote:

Originally Posted by godinu (Post 4811292)
btw quentin, i love those offer mockups! are u offering such templates in another thread? I've read a lot of your posts and learned a lot. hadn't noticed those though!

You would need to be very careful about using one of those landing type pages as the first page a mobile user goes to. I have seen a few of those pages and the images on most are well over 100kb. This means on the average mobile connection it will take some time for the images to load. The first page you serve up to a mobile user should be streamlined so it shows up as quickly as possible so as to not put them off. The first page is the most important part of your mobile experience. If it takes forever to load people will hit that back button and go elsewhere.

These types of pages are best used in situations where a customer is sitting in your restaurant or business that has free wifi and you have a coupon offer on the table that takes them to a landing page like this.


All times are GMT -6. The time now is 08:39 PM.