Need help with .htaccess please

by 3 replies
4
hello guys.

I had wordpress installed on my website with goddady hosting, I un-installed it, then I added a normal website...but when I wanted to enter the website without "www" it returned a 403 Forbidden. Then I saw on some forum that a guy just deleted the code from the .htaccess file and then it worked for him...so I did it and the same thing happens now.

So...what should I add in my .htaccess file so I can access the website without putting "www" in front of the address.

Thank You for the help.
#programming #htaccess
  • Try this, I found it while back when i wanted to redirect to www

    Code:
    RewriteEngine On 
    RewriteCond %{HTTP_HOST} ^domain@.@co@m
    RewriteRule (.*) h@ttp@://@w@ww@.@dom@ain.@c@om/$1 [R=301,L]
    
    Here's the same thing for "2-part tld's":
    
    RewriteEngine On 
    RewriteCond %{HTTP_HOST} ^domain.co.uk
    RewriteRule (.*) h@ttp@://@ww@w@.@domain@.@co@.@uk/$1 [R=301,L]
    Remove all the @'s sign i am new to the forum and it don't allow me to post link until 15 day's
  • Hello,

    Can you post the .htacces code here for more details.

    Thanks
  • solved. Thanks for helping
  • [DELETED]

Next Topics on Trending Feed

  • 4

    hello guys. I had wordpress installed on my website with goddady hosting, I un-installed it, then I added a normal website...but when I wanted to enter the website without "www" it returned a 403 Forbidden. Then I saw on some forum that a guy just deleted the code from the .htaccess file and then it worked for him...so I did it and the same thing happens now.