Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

.htaccess tip - Force www. in dynamic php mysql flash web site tutorial

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
11,552
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Apr 8, 2009

Here is the code to copy and paste

# Make all requests have the www. in them
RewriteEngine on
RewriteCond %{HTTP_HOST} ^websitename\.com
RewriteRule ^(.*)$ http://www.websitename.com/$1 [R=permanent,L]

In this quick web development tip Adam Khoury of Flash Building discusses the apache method of forcing script connection in case the www is missing from a URL that requires it for script connection.

  • likes, 2 dislikes

Link to this comment:

Share to:
see all

All Comments (12)

Sign In or Sign Up now to post a comment!
  • @McAbeeGraphics How did you get this to work? I'm having the same problem with 123-reg

  • how can this be done with nginx

  • How do I do favicons?

  • @McAbeeGraphics actually, figured it out, had to add a 1and1 workaround for Options -MiltiViews and it works like a charm. Thanks for the rewrite!

  • This gave me a 500 Internal Server Error, any ideas? I copied and pasted, and also added the disallow code. Does my web host not allow me to use .htaccess?

  • @PersonalComputerHelp it was the Good Old days. Where we had the lounge.

  • the old forum ...

  • Giving Thanks!

    Blessed, bredren

  • Thanks, i tried it and i liked what i saw :-). Love your stuff man!!!!

  • Awersome. Love your explanations. So clear.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more