News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[HELP] Wap/Mobile Site as a new Subdomain

Started by schneizel57, December 31, 2012, 11:58:25 PM

Previous topic - Next topic

Arantor

It's all possible but correspondingly way more effort to implement.

Hj Ahmad Rasyid Hj Ismail

Not really. Especially when I suddenly remember what I have done while using and playing with feline PortaMX Subforum mod and htaccess few months back. Creating a copy of the main forum using that mod is very simple and with htaccess you can rewrite the subforum which is using the subdomain to have all its url ends with ;wap2.

Arantor

I give up trying to explain why you're missing the point

Dragooon

Can't you simply re-create index.php at m.domain.com and override board_url to follow m.domain.com under WAP mode? It'll require a bit more work than that but I think that should do it.

Hj Ahmad Rasyid Hj Ismail

Quote from: Arantor on January 01, 2013, 11:24:31 AM
I give up trying to explain why you're missing the point
Sorry, I am not sure which point that I missed.

Anyway, I think Dragoon way could be one of the easiest, if rewriting the said index.php is easy for the OP that is.  ::)

schneizel57

Is it really possible? Because I saw some smf forum sites that has mobile site in subdomain m.theirsite.com which can be access through mobile devices.

Hj Ahmad Rasyid Hj Ismail

Just wait for Dragoon for this. He might have a way to do it as he suggested.

Jade Elizabeth

I getcha. We want to access the mobile version so we go to m.blah.com and that redirects us to the mobile theme. Works for me!
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Hj Ahmad Rasyid Hj Ismail

This is another way of doing it: http://script-smart.com/resources/hide-affiliate-link/online-link-cloaker.php. Put your forum wap url (or mobile theme url) in it. If I am not mistaken (since I used it some time ago), you can create a index page, php or html, for your subdomain which actually displays the wap/mobile page in it.

pkrack

Quote from: Jade Elizabeth on January 01, 2013, 06:41:06 AM
If you have a solution show us how. Don't say a few lines in .htaccess, tell us what to add :).

//Rewrite to www
Options +FollowSymLinks
RewriteEngine on
Rewriterule ^m.example.com$ www.example.com/index.php?wap2 [L]

pkrack

I have posted the code. Now those of you who consider themselves pro, come forward and give it some cuts and stitches. Together we can have an excellent end product

Hj Ahmad Rasyid Hj Ismail

You don't need to create and write htaccess file manually. You can create the subdomain redirect from cpanel.

pkrack


pkrack

Moreover, Cpanel Can only redirect one domain, while using .htaccess, we can have a completely different URL SCHEMA

Hj Ahmad Rasyid Hj Ismail

Quote from: pkrack on January 04, 2013, 07:25:42 AM
Moreover, Cpanel Can only redirect one domain, while using .htaccess, we can have a completely different URL SCHEMA
I am not sure about this because mine can do with subdomain.

Quote from: pkrack on January 04, 2013, 07:24:22 AM
Not Every User  use Cpanel
Yup. That is why we are putting all the options so that the OP can choose which he prefers.

pkrack

Quote from: ahrasis on January 04, 2013, 07:33:46 AM
I am not sure about this because mine can do with subdomain.


Offcourse subdomain can be redirected but not dynamic urls. Can Cpanel  redirects all your forum posts like m.domain.com/topic-discussed-bla-bla.html to domain.com/index.php?waps................? So cpanel is not the perfect solution.

Hj Ahmad Rasyid Hj Ismail

I rather think I was confused with the OP but what I understand is subdomain to wap url and not the dyanmic url to another dynamic url. Given that, I think cPanel can do that just fine. ;)

pkrack

Quote from: schneizel57 on December 31, 2012, 11:58:25 PM

My SMF forum can be access at this subdomain www.forum.mysite.com

Probably His posts are assisable via www.forum.mysite.com/some-post-thing-etc-etc

Quote from: schneizel57 on December 31, 2012, 11:58:25 PM
And What I want is, I like to access the wap/mobile site of my SMF forum directly at this new subdomain www.m.forum.mysite.com, whenever a user is detected using mobile device....


So I think He will also like to have www.m.forum.mysqite.com to show posts as www.m.forum.mysqite.com/some-posts-etc-etc because I don't think just redirecting www.m.forum.mysqite.com to wap version and then just using www.forum.mysqite.com/index/?topic=123132;wap2 will make no sense coz smf automatically redirects mobile browsers to wap versions then for what purpose he will need  a sub subdomian

Jade Elizabeth

The subdomain is so you don't have to remember the url for the wap.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Hj Ahmad Rasyid Hj Ismail

Quote from: pkrack on January 06, 2013, 12:26:34 AM
Quote from: schneizel57 on December 31, 2012, 11:58:25 PM

My SMF forum can be access at this subdomain www.forum.mysite.com

Probably His posts are assisable via www.forum.mysite.com/some-post-thing-etc-etc

Quote from: schneizel57 on December 31, 2012, 11:58:25 PM
And What I want is, I like to access the wap/mobile site of my SMF forum directly at this new subdomain www.m.forum.mysite.com, whenever a user is detected using mobile device....


So I think He will also like to have www.m.forum.mysqite.com to show posts as www.m.forum.mysqite.com/some-posts-etc-etc because I don't think just redirecting www.m.forum.mysqite.com to wap version and then just using www.forum.mysqite.com/index/?topic=123132;wap2 will make no sense coz smf automatically redirects mobile browsers to wap versions then for what purpose he will need  a sub subdomian
IMO you are now making too much assumptions to the extend it does not not help the OP at all.

And what's the big deal in writing htaccess manually as you suggested anyway? The htaccess code for url rewriting that you suggested is IMO nothing better or even more complete than creating it via cPanel. No offence but your solution in Reply #29 IMO will only work similar to cPanel solution already given in Reply #3 which IMO can be set in a much more easier and convenient way.

Otherwise, you are not making any sense except keep on making assumptions and pointless arguments, for no purpose except only for arguing it. This is not helping at all.

My conclusion is if one is really trying to keep the wap url with or inside the subdomain url, one can use suggestions in Reply #3 or #21 or #28 or 29. Reply #21 will be a bit confusing unless one is used to the PortaMX Subforum Mod. Reply #3 and #28 is much more easier and simpler. Reply #29 is similar to #3 except it is done manually.

However, I am not really sure how to make it work with reply #23 though I think it may work if properly coded and modified.

Advertisement: