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.

Featured Replies

Looking at a website for a friend. Its hosted on ipage.

 

There are limited tools on the ipage control panel, there is however a direct .htaccess editor which I notice has a few other domains hosted.

 

# Begin default subdomain redirect #
RewriteEngine on
RewriteCond %{HTTP_HOST} ^siteone.com
RewriteRule ^(.*)$ http://www.siteone.com/$1 [R=permanent,L]
RewriteCond %{HTTP_HOST} ^siteone.co.uk
RewriteRule ^(.*)$ http://www.siteone.co.uk/$1 [R=permanent,L]
RewriteCond %{HTTP_HOST} ^sitethree.co.uk
RewriteRule ^(.*)$ http://www.sitethree.co.uk/$1 [R=permanent,L]
RewriteCond %{HTTP_HOST} ^sitetwo.info
RewriteRule ^(.*)$ http://www.sitetwo.info/$1 [R=permanent,L]
RewriteCond %{HTTP_HOST} ^sitethree.com
RewriteRule ^(.*)$ http://www.sitethree.com/$1 [R=permanent,L]
#RewriteCond %{HTTP_HOST} ^problemsite.co.uk
#RewriteRule ^(.*)$ http://www.problemsite.co.uk/$1 [R=permanent,L]
#RewriteCond %{HTTP_HOST} ^problemsite.com
#RewriteRule ^(.*)$ http://www.problemsite.co.uk/$1 [R=permanent,L]
#RewriteCond %{HTTP_HOST} ^www.problemsite.com
#RewriteRule ^(.*)$ http://www.problemsite/$1 [R=permanent,L]
# End default subdomain redirect #
#ErrorDocument 404 http://www.problemsite.co.uk
I have hashed out the problematic ones as the non www redirect on that site redirected all non www traffic for all domains to the www.problemsite. I cannot see why as the rule is quite specific. Why it would do this to all domains. Also can anyone tell me the difference between R=Permanent and R=301? I used permanent as previous automatic entries had used permanent, but I would naturally have gone for 301.
I've hashed out the ErrorDocument 404 as I can clearly see why that did all domains.

Edited by paul66beetle

Hi,

 

The R=permanent and R=301 are the same thing.

 

 

# Begin default subdomain redirect #

RewriteEngine on
#RewriteCond %{HTTP_HOST} ^problemsite.co.uk
#RewriteRule ^(.*)$ http://www.problemsite.co.uk/$1 [R=permanent,L]
#RewriteCond %{HTTP_HOST} ^problemsite.com
#RewriteRule ^(.*)$ http://www.problemsite.co.uk/$1 [R=permanent,L]
#RewriteCond %{HTTP_HOST} ^www.problemsite.com
#RewriteRule ^(.*)$ http://www.problemsite/$1 [R=permanent,L]
# End default subdomain redirect #
#ErrorDocument 404 http://www.problemsite.co.uk

 

This is madness. I assume there are just 2 domains for problem site, problemsite.com and problemsite.co.uk? Are there 2 sites or just one for problemsite.co.uk with problemsite.com forwarding in? Baffling :s

  • Author

There are two sites. Four if you include non www. ones. So three rules to direct to the hosted www.problemsite.co.uk if that makes sense.

 

Seems messy having it this way with the .htaccess sitting server side as opposed to the root directory of the site. Not sure whether this was intentional.

Hmmm. This is what I use for non www to the www version.

#If the Domain is not www.
Rewritecond %{HTTP_HOST} !^www\.domain\.com
# Then direct to www version
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]

The bits i'm stuck on is the 'working' ones as the dots are not escaped?

  • Author

The host gives you access to a .htaccess editor. The others were already populated. I am guessing when additional domains were added they added the permanent rules on. This must have been a recent thing as the problematic domain was one of teh first if not the first domain to go on but wasn't listed on the .htaccess.

 

So all I have done via their own panel is to add the above in the same format as theirs.

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.