Need help with .htaccess please

3 replies
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.
#htaccess
  • Profile picture of the author KrishManohar
    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
    {{ DiscussionBoard.errors[268067].message }}
  • Profile picture of the author codeswarrior
    Hello,

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

    Thanks
    {{ DiscussionBoard.errors[269796].message }}
  • Profile picture of the author Marian Berghes
    solved. Thanks for helping
    {{ DiscussionBoard.errors[270224].message }}

Trending Topics