need quick htaccess help!

Spawn

BANNED
Joined
Jun 20, 2009
Messages
1,184
Reaction score
394
Website
www.webbiy.com
should take 5 minutes, just need a small tweak to change from a www. to regular http:// let me know! ill pay 5usd
 
You mean www to non www?

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^.*$ http://domain.com%{REQUEST_URI} [R=301,L]

In both cases, make sure to replace "domain" with the URL of your domain.
 
Do you know how to Ftp? You'll need to edit your .htaccess file and put that at the top of it
 
i have a site at http://example.co i setup the blog mistakenly at http://www.example.co/blog/
im trying to make it http://example.co/blog/
thank you!
 
Like Nufaman stated above go get a FTP client like Filezilla.

Go to public_html folder of your domain that your trying to change the www to non www

Look for .htaccess file

Open .htaccess to edit file

Place the following code at the beginning of the .htaccess file:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^http://www.example.co [NC]
RewriteRule ^(.*)$ http://example.co/$1 [L,R=301]

Replace example.co with your domain name.

Test your server to see if it works. You might have to restart apache.
 
Last edited:
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock