Pages don't open without "www" or ".html"

ninehigh

Newbie
Joined
Sep 14, 2010
Messages
21
Reaction score
7
Hey Guys,

I recently backed up my websites and transferred them to a different server. Now that they're installed, I'm having a frustrating issues:

All of the links on the site are in the format "domain(dot)com(slash)page" without ".html" after it.

So now, none of the links on the website work, you have to go into the address bar and add ".html" to get the page to load.

ALSO, it requires me to put the "www" before the domain name.

Could someone please help? I REALLY don't want to have to go into all of the pages and change the links to add ".html" at the end!

Thanks​
 
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html[COLOR=#FF0000]
 [/COLOR]RewriteCond %{HTTP_HOST} ^example.com
 RewriteRule (.*) http://www.example.com/$1 [R=301,L]

Add this To Your htaccess file.

Edit Example.com To your site :)

Pages Will Open Fine :)

~ExP~
 
Thanks Guys. I made the changes below and replaced "example" with "maxmight" so now I'm able to get the homepages without typing www, but I'm still not getting the other pages to work.
My HTaccess file was blank, so the only content is what's below.

Also, I have hosting with hostgator. I have added multiple domains as "addon domains. Do I need to put this file in each sub-folder? that's how I have it now.

Let me know, Thanks again.
 
Back
Top