Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: How to set my domain to www ?

  1. #11
    Senior Member matt9250's Avatar
    Join Date
    Jan 2011
    Location
    Texas
    Posts
    180
    Thanks
    19
    Thanked 5 Times in 5 Posts
    find out what part is breaking your site. the rewrite code from mr_green worked perfect for me. if you are referring to the next lines of code he posted, then try taking out portions until your site is working again to see what the problem code is.

    we were talking about caching for our sites also. caching speeds up your site.

  2. The Following User Says Thank You to matt9250 For This Useful Post:

    pinocchio (January 27th, 2011)

  3. #12
    Thread Starter
    Veteran pinocchio's Avatar
    Join Date
    Sep 2010
    Location
    United Kingdom
    Posts
    633
    Thanks
    83
    Thanked 21 Times in 16 Posts
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^domaine.com$
    RewriteCond %{SERVER_PORT} ^80$
    RewriteRule (.*)$ http://www.domaine.com/$1 [R=301,L]

    AddType application/x-httpd-php5 .php
    AddType application/x-httpd-php5 .html .htm
    AddType application/x-httpd-php5 .js

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(\.gz) $">
    Header set Expires "Thu, 15 Apr 2015 20:00:00 GMT"
    </FilesMatch>

    <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(\.gz) ?$">
    Header unset ETag
    FileETag None
    </FilesMatch>

    <FilesMatch "\.(avi|mov|mp3|wmv|wav)$">
    ExpiresDefault A29030400
    Header append Cache-Control "public"
    </FilesMatch>
    do u mean this code ? I am sorry for asking such high school questions. I am totally newbie at modifying htaccess. can u plz let me know step by step ?

    Thanx

  4. #13
    Senior Member matt9250's Avatar
    Join Date
    Jan 2011
    Location
    Texas
    Posts
    180
    Thanks
    19
    Thanked 5 Times in 5 Posts
    i am a newbie to php as well. but the first 4 lines are the rewrite for the www or your url. the rest is for the http header, which mr_green helped me understand. this basically tells a browser not to download again those file types and to pull a cached version from the user's browser. this helps your user view your site faster as they don't have to keep re-downaloding certain types of files.

  5. The Following User Says Thank You to matt9250 For This Useful Post:

    mr_green (January 28th, 2011)

  6. #14
    Thread Starter
    Veteran pinocchio's Avatar
    Join Date
    Sep 2010
    Location
    United Kingdom
    Posts
    633
    Thanks
    83
    Thanked 21 Times in 16 Posts
    should I change anything in WP too ? or just htaccess is enough ?

  7. #15
    Senior Member matt9250's Avatar
    Join Date
    Jan 2011
    Location
    Texas
    Posts
    180
    Thanks
    19
    Thanked 5 Times in 5 Posts
    i believe just htaccess. and a good plugin to look at is WP Minify, it will compress your .js and .css files. should help a little as well.

  8. #16
    mr_green's Avatar
    Join Date
    Aug 2010
    Posts
    943
    Thanks
    112
    Thanked 189 Times in 145 Posts


    visitor first coming ---->380.3k

    visitor second page ----> 25.1

    Notice
    iframe = Google ad
    Flash object = Youtube & Ad Google
    Best
    mr green



    Since 2010 Provide help for the community Appthemes


  9. The Following User Says Thank You to mr_green For This Useful Post:

    pinocchio (January 28th, 2011)

  10. #17
    Senior Member matt9250's Avatar
    Join Date
    Jan 2011
    Location
    Texas
    Posts
    180
    Thanks
    19
    Thanked 5 Times in 5 Posts
    wow, taht is great results mr_green, thanks for showing us. what program are you using to show this data?

  11. #18
    Veteran cloudybright's Avatar
    Join Date
    Sep 2010
    Location
    Code Hell
    Posts
    590
    Thanks
    14
    Thanked 53 Times in 50 Posts
    Quote Originally Posted by matt9250 View Post
    wow, taht is great results mr_green, thanks for showing us. what program are you using to show this data?
    Check this link: https://addons.mozilla.org/en-US/firefox/addon/yslow/ (secure link) or
    this link: Yahoo! YSlow for Firebug

  12. #19
    mr_green's Avatar
    Join Date
    Aug 2010
    Posts
    943
    Thanks
    112
    Thanked 189 Times in 145 Posts
    Dear Cloudy

    You forget Page Speed Extension for Firefox/Firebug
    Page Speed Extension Overview
    Best
    mr green



    Since 2010 Provide help for the community Appthemes


  13. #20
    Rookie mario92's Avatar
    Join Date
    Oct 2011
    Location
    Poland
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi guys!,
    I have the same problem but none of these solutions works for me. A error shows up "to many redirections". Can some body help we with that?

    Thanks!

Page 2 of 3 FirstFirst 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: December 30th, 2010, 05:17 PM