Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

.htaccess file to 301 redirect .domain to www.domain

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
Home » Discuss » DU Groups » Computers & Internet » Website, DB, & Software Developers Group Donate to DU
 
DaveJ Donating Member (1000+ posts) Send PM | Profile | Ignore Thu Nov-18-10 07:50 PM
Original message
.htaccess file to 301 redirect .domain to www.domain
I'm not at all that familar with Linux/Apache webservers, but one of our sites is hosted on one, and what we need is .ourdomain.com to 301 redirect to www.ourdomain.com. Our SEO experts said we should do this 301 redirect, as opposed to a DNS redirect.

Our SEO guys gave us some standard code for .htaccess that looks something like this:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1

This redirects but then on the destination (www) pages we get an Aapche server error. (500 Internal Server Error Connection ... Please contact the server administrator)

Ok, so that's it. Our SEO guys asked if our web host providers would help, but our web host is horrible. They totally refuse to help. Some IT guy who's never written a line of code in his life says it must be something it my code, but there IS NO code on the server besides SHTML pages and this redirect, which apparently he knows nothing about. I have no idea why we are paying extra money for SpeakEasy web host, when even GoDaddy would be better at $5/mo. They do absolutely nothing, act like they don't even want to host, and treat their customers like inconveniences.

I guess we should hire an Apache/Linux expert to help, but this seems so trivial. Three lines of code that should work. I even tried a simple redirect of one page to another page and get the same error.

Refresh | 0 Recommendations Printer Friendly | Permalink | Reply | Top
2Design Donating Member (1000+ posts) Send PM | Profile | Ignore Fri Nov-26-10 03:39 PM
Response to Original message
1. do the redirect from cpanel Redirect
it writes the code for you

Printer Friendly | Permalink | Reply | Top
 
DaveJ Donating Member (1000+ posts) Send PM | Profile | Ignore Tue Nov-30-10 07:59 PM
Response to Reply #1
2. Oh yeah I saw that technique
There are just a couple issues with that. First, I do not know how to access cpanel. I am accessing this location remotely, using ftp to upload files. I got into some kind of command line environment once, but I do not remember how, some kind of terminal application? Second, I doubt there is anything wrong with the code, so cpanel writing the code might not help, but I'm definitely willing to give it a try.

I appreciate the help. If you could just help me access cpanel I will try this. Sorry for the delayed reply.....
Printer Friendly | Permalink | Reply | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Sun Dec 22nd 2024, 03:27 AM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » DU Groups » Computers & Internet » Website, DB, & Software Developers Group Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC