Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

htaccess and directly accessing pages

Featured Replies

Hi all, I have 2 pieces to my htaccess that seem to have conflicting interests. The first block is what I have added as the site is built with Vue and the tutorial suggested this. The second is from my old site and forwards requests without 'www' to the address with 'www'.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
  
RewriteCond %{HTTP_HOST} ^address.co.uk [NC]
RewriteRule ^(.*)$ http://www.address.co.uk/$1 [L,R=301,NC]

</IfModule>

The non 'www' url forwards correctly when on the homepage, but if someone directly accesses a sub page without adding 'www' it simply just stalls on loading. Is this easy to overcome? At worst I will the second part for the time being, but would be great to know if there is a simple solution to this. 

Thanks

Hi Red,

This should fix the non-www to www;

RewriteCond %{HTTP_HOST} !^www\.address\.co\.uk [NC]
RewriteRule (.*) http://www.address.co.uk%{REQUEST_URI} [L,R=301]

... this says if the http_host is not www.address.co.uk then to forward to the www version with a permanent 301.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.