How to: Create a sub-domain for Mobile Oxwall

Hello everyone.

With the recent news of Oxwall 1.7 coming, we are certain here at EWT that there will be a lot of questions from users about Oxwall mobile. As found in the Oxwall Blog’s official post about 1.7, the mobile version of Oxwall that was released earlier this year on January 8th is now getting a new edition – Messaging. Online side this, the Private Messaging and IM plugins will be merged to be just “Messaging,” but you can read all about that in the official post.

Today, I want to share a trick with you that some users will find very useful – how to make a sub-domain such as m.mysite.com re-direct to your mobile website.

This is a simple and easy mod that shouldn’t cause damage to anything. But when modding, always make sure to be safe and follow the directions carefully and thoroughly.

  1. Make your sub-domain: You can do this from your cPanel on your host under the ‘Sub Domain’ settings. Set it to whatever you want, it can be mobile.mysite.com or just m.mysite.com. Whatever suits you. For the sake of this tutorial, we’re going with m.mysite.com
  2. Make/Edit the .htaccess file: You can go two ways with this; add a new .htaccess file to your new sub-domain folder (which is generated automatically in the main directory of public_html when you save a sub domain) or edit the already existing .htaccess that Oxwall includes. With our method, we’re going to go ahead and just add a brand new .htaccess to our now empty “m” folder.

    If you’re using a FTP from your machine (like FileZilla) you can just go and add the code from Step 3 to a .htaccess file and upload it to “m.” Elsewise, if you’re in the file manager of your host and are in the “m” directory, right-click and create a new file. Simply type in .htaccess

  3. Add the code: Now that the file is there, we need to add the .htaccess code. This code will do one simple task: re-direct the user from m.mysite.com to mysite.com/mobile-version which will, because of the way mobile Oxwall works, create a mobile session for that user, bringing them to your main mobile page. Add this code to your .htaccess file:

        RewriteCond %{HTTP_HOST} ^m.mysite.com
        RewriteRule ^(.*)$ http://mysite.com/mobile-version/$1 [R=301]

    Make sure to replace “mysite.com” with your actual domain.

  4. Now, hit save: Save the file, and then clear the cache of your website. Do it easily by installing Cache Cleaner plugin (it’s free!).

Now, test it out by typing in m.mysite.com on your device and if it takes you to the mobile version then congrats!

Did you get the answer you were searching for?

Save hours of searching online or wasting money testing unnecessary plugins, get in touch with me and let's discuss a suitable plan for your project. Best thing about this service is that you are never placed on hold and get to talk to an expereinced Oxwall/Skadate developer.

Get Answers for Free!

Ask a question related to this topic and get immediate answers from other community members in 48hrs or less. Contribute by answering members questions.

Ask Question
Premium Service

Whether it's a custom plugin, theme or dedicated support needed to get you started on your project, get professional 24/7 support tailored to your need.

Get in Touch

Or just leave a comment...

NOTES:
  • If the user is already in an active “mobile site” session, and they enter in the address m.mysite.com, they will be brought to an error page. This is because the redirect goes to the programmatic URL /mobile-version which isn’t an actual page on your mobile site.
  • If you don’t want to add a new .htaccess, just simply paste this code in the bottom of the .htaccess file in the main directory of your Oxwall installation.

Leave a Reply