Home > Net >  Can we have two different homepages for same website
Can we have two different homepages for same website

Time:09-17

I am working on a project. I am making clone of a website Make My Trip

https://www.makemytrip.com/

this website looks different in laptop and mobile, I mean totally different. So how can we achieve such functionality.

This is the view in Laptop

Same website in Mobile

CodePudding user response:

You can use css to show/hide the elements based on the breakpoints. https://www.w3schools.com/howto/howto_css_media_query_breakpoints.asp

CodePudding user response:

You'll likely need to detect the mobile originating request and redirect it to the appropriate home page.

`<script>window.location.href = "http://www.w3schools.com"</script>;`

I found this answer that you may find helpful.

Detecting a mobile browser

  • Related