Tell me more ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm hosting my website on Google app engine and my domain name on Godaddy.

Google app engine does not allow you to have naked URLs. So it doesn't allow you to have example.com but does allow you to have `www.example.com.

I can easily enable forwarding in Godaddy to forward exmample.com to www.example.com however it does not keep the relative URL path.

For example I would like for: example.com/images/3.jpg to be forwarded to www.example.com/images/3.jpg and not just www.example.com.

share|improve this question

1 Answer

Why don't you just use .htaccess

Create a text file. and copy and paste the following inside:

# Force 'non-www' to 'www'
RewriteEngine On
RewriteCond %{HTTP_HOST} ^YOURDOMAIN.com [NC]
RewriteRule ^(.*)$ http://www.YOURDOMAIN.com/$1 [L,R=301] 
  1. rename it to ".htaccess"
  2. upload it to your "public_html" folder where index.php is located
share|improve this answer
The hosting is on Google App engine, which doesn't have the concept of a public_html folder. – paulmorriss Dec 16 '11 at 15:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.