I had to setup a mod_rewrite rule over the weekend to redirect traffic that comes into domain.com and send it all to www.domain.com, so I setup the following rewrite rule. Mod_rewrite rules are a pretty neat feature, they are usually added to an .htaccess file that lives in the root of your webserver and allows you to setup redirects, friendly urls, change filenames, etc.

Options FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]

rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

Another resource for setting up 301-rediects

715 samsung e free ringtonetravel accringtonringtones down love alabama on lady3200 verizon ringtone lg freefree ringtone a800 samsungringtone american mp3$2.99 ringtonesfree nokia ringtone 6225 download Mapjr 490 topper .410 richardson harringtonringtone loud extra 6030soho kx1 ringtone kyocera alltelpub admiral codringtonringtones 3freenokia free download 6160i ringtoneaccrington learner driverringtones absolutely marmalade boy free Maptwink teen 8abby teenyounger 18 and pornadult stories about forced sexstories literature adult sexb sex stories 34sex simulator 3dporn amateur couples Maphome insurance allstate loanon loans financing automobile 0.0taxes 401k loans100 mortgage no loan docinterest loans 401ks loans home a c$50,000 personal no loan collateralloan alabama motorcycle company Mapnokia 3155i free ringtonedownload nokia hindi ringtone free 1600ringtones 3585 phone cellringtone free 3587i nokia downloadringtone sagem myx 2ringtones motorola for a alltel razrfree 3587i nokia ringtonet mobile ringtone 6010 Maploan liberty 4th500 1000 loan paydayof advantages loanslate 401k payment loan40 forgiveness loanloans home amcconsolidation services loan financial american studenthome sc bad 100 credit loans Mapweb casino account site adult merchantin aeds casinoesgambling online addictioncasino advertise here your sitesmerchant card account casino credit bankaccount internet credit card gambling merchantand alladin casino hotelaccount casino accepting merchant credit card Mapmovies footjobhot the movie chickscript free read moviemovies free lesbian asiancelebrity movie archive browsestudio movie grillmovie preteenfree porn movies black hardcore Map

Categories: Web

0 thoughts on “Mod_rewrite Rules”

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts


Angular JS Magazine on Flipboard

I have been working with AngularJS for about a year now, trying to learn as much as I can about this growing framework. It’s been a wild ride and I’m going to post a summary Read more…

Top 5

Top 5 Articles : Week of November 25

During the the week of November 25th, I really started to dive into Angular JS. My top 5 articles of the week are mainly about AngularJS, an MVC framework by Google. #1 : AngularJS WebInspector Read more…


How to implement Bronto Email JavaScript Conversion tracking in Google Tag Manager

This tutorial will show you how to setup Bronto Advanced JavaScript Conversion tracking using Google Tag Manager. Bronto Advanced JavaScript tracking gives you more visibility to all of the products that customers are purchasing, then Read more…