• Resolved bashabi

    (@bashabi)


    #User added 301  Redirects
     Redirect 301 https://inetplc.com/ https://www.inetplc.com
     Redirect 301 https://www.inetplc.com/ https://www.inetplc.com
     Redirect 301 https://inetplc.com/ https://www.inetplc.com
     Redirect 301 https://inetplc.com/intelligent-numbers-campaign 
     https://www.inetplc.com/intelligent-numbers-campaign
     Redirect 301 https://inetplc.com/high-volume-telephony https://www.inetplc.com/high-volume-telephony
     Redirect 301 https://inetplc.com/call-centre-software-solutions 
     https://www.inetplc.com/call-centre-software-solutions
     Redirect 301 https://inetplc.com/ipbx-cloud-telephony https://www.inetplc.com/ipbx-cloud-telephony
     Redirect 301 https://inetplc.com/pci-dss-compliant-payment-solutions 
     https://www.inetplc.com/pci-dss-compliant-payment-solutions
     Redirect 301 https://inetplc.com/case-studies https://www.inetplc.com/case-studies
     Redirect 301 https://inetplc.com/about-inet https://www.inetplc.com/about-inet
     Redirect 301 https://inetplc.com/inet-partners https://www.inetplc.com/inet-partners
     Redirect 301 https://inetplc.com/blog https://www.inetplc.com/blog
     Redirect 301 https://inetplc.com/contact-us https://www.inetplc.com/contact-us
    
     #This Apache config file was created by Duplicator Installer on 2019-07-19 09:20:24.
    
     #The original can be found in archived file with the name htaccess.orig
    
     # BEGIN WordPress
      <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteBase /
      RewriteRule ^index\.php$ - [L]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /index.php [L]
      </IfModule>
     # END WordPress

    This is my htaccess code. I have written the 301 redirection so that if someone writes the url without the WWW it redirects them into WWW

    But its not working. Only the front page works. but its probably because I have set the site address with www

    How to create the 301 redirection so that (for an example) clicking on https://inetplc.com/about-inet will redirect into https://www.inetplc.com/about-inet

    • This topic was modified 5 years, 7 months ago by bashabi.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    This is all you need

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
    RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [L,R=301]

    Make sure that “www” is specified in the URLs under settings->general

    Thread Starter bashabi

    (@bashabi)

    Thank you .

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘301 redirection code in .htacess file is not working. How to fix that’ is closed to new replies.