Streaming live at 10am (PST)

Add code in htaccess


#1

Hi, I have hosted project and I need to add some custom code inside .htaccess file but I can’t find where the .htaccess file. Maybe anyone know how to add custom code in .htaccess ?


Probelm running the website on Internet Explorer
#2

.htaccess file is not available for editing on Webflow hosting, even if it does exists.

Vote for this feature here https://wishlist.webflow.com/ideas/WEBFLOW-I-756

Why do you need it? If it’s for redirection, we have 301 redirects section in the site dashboard.


#3

I need it to add code to change DirectoryIndex if site opened in mobile browser. Do you have advise to do that ?


#4

You can set the default (home) page in the Webflow Designer itself.


#5

Could I set different default (home) page for mobile and desktop ?


#6

Hi @antonia88sina, at the moment there can only be one home page the site, this cannot be changed for different viewports.

Thanks in advance.


#7

Thanks for your feedback. Can you suggest how to make it happen ? So, I can have different homepage for mobile ? Because I already has paid account and paid hosting. I need to make it different on mobile and desktop.


#8

You can have two main containers in your page - one displays on desktop, the other displays on mobile.

See https://university.webflow.com/article/intro-to-breakpoints


#9

In my case I have two page and not two containers in page because the structure page is very different between mobile and desktop.


#10

Another alternative is to use custom code to detect when the user is a mobile device (on the desktop page), then redirect them to the mobile page.


#11

Yet another workaround is use Cloudflare to redirect mobile users to another site/subdomain.


#12

Yes, I think use custom code is the best solutions but my client not want to redirect to different URL so the URL must be the same.