Page 1 of 2 1 2 LastLast
Results 1 to 15 of 20

htaccess Problem

This is a discussion on htaccess Problem within the General Discussion forums, part of the vBSEO SEO Plugin category; Hey all, If this is not the correct forum for this i apologize. I recently bought an ssl certificate for ...

  1. #1
    Member Array webdevoman's Avatar
    Real Name
    Rich Glaser Jr
    Join Date
    Aug 2012
    Location
    East Coast USA
    Posts
    45
    Liked
    0 times

    htaccess Problem

    Hey all,

    If this is not the correct forum for this i apologize.

    I recently bought an ssl certificate for my domain so I could install the Vbulletin facebook forum app. I finally got the thing working but it only works with the non ww version of my site. Because of that I want to set up the domain to only use the non ww version of the domain. I went to Google webmaster tools and changed the preferred domain and I also added code to the htaccess but I still see the www when I visit the site.

    My htaccess is very long and confusing and I am hoping someone can tale a peek and let me know if it is ok. I have the media library installed and a couple other addons to the htaccess. I am using 4.2 with the latest version of Vbseo. I just bought and installed it about a week ago or so.

    Here is my htaccess--Thanks so much for the help

    <IfModule mod_security.c> SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>
    ## Expires
    <ifModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 1 seconds"
    ExpiresByType text/html "access plus 1 seconds"
    ExpiresByType image/gif "access plus 3456000 seconds"
    ExpiresByType image/jpeg "access plus 3456000 seconds"
    ExpiresByType image/png "access plus 3456000 seconds"
    ExpiresByType text/css "access plus 3456000 seconds"
    ExpiresByType text/javascript "access plus 3456000 seconds"
    ExpiresByType application/javascript "access plus 3456000 seconds"
    ExpiresByType application/x-javascript "access plus 3456000 seconds"
    </ifModule>


    ## Compression
    <ifmodule mod_headers.c>
    <ifmodule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/css text/xml application/x-javascript
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    </ifmodule>
    </ifmodule>


    ## Rewrites
    <ifmodule mod_rewrite.c>
    RewriteEngine on
    Options +FollowSymlinks


    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]

    RewriteCond %{HTTP_HOST} ^www\.musclemecca\.com$
    RewriteRule ^(.*)$ http://musclemecca.com/$1 [L,R=301]

    RewriteBase /


    #RewriteCond %{HTTP_HOST} !^www\.musclemecca\.com
    #RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]


    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]


    RewriteCond %{REQUEST_URI} !(notadmincp/|modcp/|cron|vbseo_sitemap|api\.php)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]


    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(notadmincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]






    # Media Library
    ReWriteRule ^media/m(\d+).*/tags$ media.php?do=tags_edit&mid=$1 [QSA]
    ReWriteRule ^media/m(\d+).*/edit$ media.php?do=details_edit&mid=$1 [QSA]
    ReWriteRule ^media/m(\d+).*/report$ media.php?do=report&mid=$1 [QSA]
    ReWriteRule ^media/m(\d+).*/c(\d+)$ media.php?do=comment_edit&cmt=$2 [QSA]
    ReWriteRule ^media/m(\d+).*/p(\d+).*$ media.php?do=details&mid=$1&pid=$2 [QSA]
    ReWriteRule ^media/m(\d+).* media.php?do=details&mid=$1 [QSA]
    ReWriteRule ^media/p(\d+).*/edit$ media.php?do=playlist_edit&pid=$1 [QSA]
    ReWriteRule ^media/p(\d+).* media.php?do=playlist&pid=$1 [QSA]
    ReWriteRule ^media/c(\d+).* media.php?do=category&cid=$1 [QSA]
    ReWriteRule ^media/u(\d+).* media.php?do=user&uid=$1 [QSA]
    ReWriteRule ^media/tag/(.*) media.php?do=tag&tid=$1 [QSA]
    ReWriteRule ^media/results/(.*) media.php?do=results&query=$1 [QSA]
    ReWriteRule ^media/advresults/(.*) media.php?do=advresults&query=$1 [QSA]
    ReWriteRule ^media/letter/(.*) media.php?do=letter&query=$1 [QSA]
    ReWriteRule ^media/browse.* media.php?do=browse [QSA]
    ReWriteRule ^media/search.* media.php?do=search [QSA]
    ReWriteRule ^media/random.* media.php?do=random [QSA]
    ReWriteRule ^media/submit.* media.php?do=submit [QSA]
    ReWriteRule ^media/tagcloud.* media.php?do=tagcloud [QSA]
    ReWriteRule ^media/playlists.* media.php?do=playlists [QSA]
    ReWriteRule ^media/pcreate.* media.php?do=playlists_create [QSA]
    ReWriteRule ^media/pmine.* media.php?do=playlists_mine [QSA]
    ReWriteRule ^media/favorites.* media.php?do=favorites [QSA]
    ReWriteRule ^media/subscriptions.* media.php?do=subscriptions [QSA]
    ReWriteRule ^media/admin/edit/s(\d+).* media.php?do=admin_host_edit&sid=$1 [QSA]
    ReWriteRule ^media/admin/delete/s(\d+).* media.php?do=admin_host_delete&sid=$1 [QSA]
    ReWriteRule ^media/admin/export/s(\d+).* media.php?do=admin_host_export&sid=$1 [QSA]
    ReWriteRule ^media/admin/(\w+).* media.php?do=admin_$1 [QSA]


    # Media Library from Video Directory
    RewriteCond %{QUERY_STRING} do=viewdetails&videoid=(\d+)
    RewriteRule ^video\.php$ media.php?do=details&mid=%1
    RewriteCond %{QUERY_STRING} viewcategory&categoryid=(\d+)
    RewriteRule ^video\.php$ media.php?do=category&cid=%1
    RewriteCond %{QUERY_STRING} viewuser&userid=(\d+)
    RewriteRule ^video\.php$ media.php?do=user&uid=%1
    RewriteCond %{QUERY_STRING} viewtag&tag=(.*)
    RewriteRule ^video\.php$ media.php?do=tag&tid=%1
    ReWriteRule ^video\.php$ media.php


    # Forum
    RewriteRule ^threads/.* showthread.php [QSA]
    RewriteRule ^forums/.* forumdisplay.php [QSA]
    RewriteRule ^members/.* member.php [QSA]
    RewriteRule ^blogs/.* blog.php [QSA]
    ReWriteRule ^entries/.* entry.php [QSA]


    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]


    # MVC
    RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]
    </ifmodule>


    RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is |id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|s r|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|sq|ca|et|tl|gl|hi|id|lv|lt|mt|sl|uk |vi|cy|yi)/archive/index.php/(.*)?$ archive/index.php?/$2&language=$1 [L,QSA]
    RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is |id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|s r|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ index.php?language=$1 [L,QSA]
    RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is |id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|s r|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$ $2?language=$1 [L,QSA]


    php_flag magic_quotes_gpc Off


    RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]


    allow from 72.200.166.190
    allow from 72.209.29.226


    # Black List
    deny from 124.6.181.177
    deny from 87.155.250.248
    deny from 24.140.43.87
    deny from 95.27.209.210
    deny from 203.147.88.166
    deny from 111.120.83.62
    deny from 121.54.64.29
    deny from 59.92.69.78
    deny from 122.173.221.53
    deny from 59.92.69.78
    deny from 95.43.78.64
    deny from 67.82.173.16
    deny from 24.210.247.95
    deny from 60.242.93.68
    deny from 67.1.5.196
    deny from 93.81.54.241
    deny from 78.14.192.52
    deny from 190.74.241.147
    deny from 115.73.41.192
    deny from 218.175.151.155
    deny from 199.21.99.69
    deny from 189.251.2.77
    deny from 60.242.85.35
    deny from 207.46.13.147
    deny from 121.218.178.119
    deny from 1.55.57.124
    deny from 1.52.0.0/14
    deny from 114.79.52.209
    deny from 173.234.29.168
    Ok, i just spotted a duplicate entry for the redirect for non www I believe but it is commented anyways....

  2. #2
    vBSEO.com Webmaster Array Mert Gökçeimam's Avatar
    Real Name
    Lizard King
    Join Date
    Oct 2005
    Location
    Istanbul, Turkey, Turkey
    Posts
    23,463
    Liked
    721 times
    Blog Entries
    4
    There are many errors in that .htaccess Please remove all useless entries for mediawiki , enterprise translator and use vBSEO htaccess content and your https code
    Mert Gökçeimam / Crawlability Inc.

    vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
    Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!


    Twitter:@Depkac
    Personal Blog : Mert Gökçeimam

  3. #3
    Member Array webdevoman's Avatar
    Real Name
    Rich Glaser Jr
    Join Date
    Aug 2012
    Location
    East Coast USA
    Posts
    45
    Liked
    0 times
    yeah, I stooped the https..all I needed to do was add the s basically..in regards to the other stuff could you be more specific? I have a media library installed and a few other things but not sure what needs to be pulled..

    I am also getting a ton of unfound urls in webmaster tools also si9nce I made this change. after adding the ssl to the non www domain I also made that domain preferred in google..now I am using htaccess to forward www to non www but I am getting thousands of non found errors for www urls.. I have never had such a nightmare adding a stupid ssl certificate..

    thanks for your help..any advice would be appreciated big time..

    How is this??

    ## Expires<ifModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 1 seconds"
    ExpiresByType text/html "access plus 1 seconds"
    ExpiresByType image/gif "access plus 3456000 seconds"
    ExpiresByType image/jpeg "access plus 3456000 seconds"
    ExpiresByType image/png "access plus 3456000 seconds"
    ExpiresByType text/css "access plus 3456000 seconds"
    ExpiresByType text/javascript "access plus 3456000 seconds"
    ExpiresByType application/javascript "access plus 3456000 seconds"
    ExpiresByType application/x-javascript "access plus 3456000 seconds"
    </ifModule>


    ## Compression
    <ifmodule mod_headers.c>
    <ifmodule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/css text/xml application/x-javascript
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    </ifmodule>
    </ifmodule>


    ## Rewrites
    <ifmodule mod_rewrite.c>
    RewriteEngine on
    Options +FollowSymlinks


    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]


    # Media Library
    ReWriteRule ^media/m(\d+).*/tags$ media.php?do=tags_edit&mid=$1 [QSA]
    ReWriteRule ^media/m(\d+).*/edit$ media.php?do=details_edit&mid=$1 [QSA]
    ReWriteRule ^media/m(\d+).*/report$ media.php?do=report&mid=$1 [QSA]
    ReWriteRule ^media/m(\d+).*/c(\d+)$ media.php?do=comment_edit&cmt=$2 [QSA]
    ReWriteRule ^media/m(\d+).*/p(\d+).*$ media.php?do=details&mid=$1&pid=$2 [QSA]
    ReWriteRule ^media/m(\d+).* media.php?do=details&mid=$1 [QSA]
    ReWriteRule ^media/p(\d+).*/edit$ media.php?do=playlist_edit&pid=$1 [QSA]
    ReWriteRule ^media/p(\d+).* media.php?do=playlist&pid=$1 [QSA]
    ReWriteRule ^media/c(\d+).* media.php?do=category&cid=$1 [QSA]
    ReWriteRule ^media/u(\d+).* media.php?do=user&uid=$1 [QSA]
    ReWriteRule ^media/tag/(.*) media.php?do=tag&tid=$1 [QSA]
    ReWriteRule ^media/results/(.*) media.php?do=results&query=$1 [QSA]
    ReWriteRule ^media/advresults/(.*) media.php?do=advresults&query=$1 [QSA]
    ReWriteRule ^media/letter/(.*) media.php?do=letter&query=$1 [QSA]
    ReWriteRule ^media/browse.* media.php?do=browse [QSA]
    ReWriteRule ^media/search.* media.php?do=search [QSA]
    ReWriteRule ^media/random.* media.php?do=random [QSA]
    ReWriteRule ^media/submit.* media.php?do=submit [QSA]
    ReWriteRule ^media/tagcloud.* media.php?do=tagcloud [QSA]
    ReWriteRule ^media/playlists.* media.php?do=playlists [QSA]
    ReWriteRule ^media/pcreate.* media.php?do=playlists_create [QSA]
    ReWriteRule ^media/pmine.* media.php?do=playlists_mine [QSA]
    ReWriteRule ^media/favorites.* media.php?do=favorites [QSA]
    ReWriteRule ^media/subscriptions.* media.php?do=subscriptions [QSA]
    ReWriteRule ^media/admin/edit/s(\d+).* media.php?do=admin_host_edit&sid=$1 [QSA]
    ReWriteRule ^media/admin/delete/s(\d+).* media.php?do=admin_host_delete&sid=$1 [QSA]
    ReWriteRule ^media/admin/export/s(\d+).* media.php?do=admin_host_export&sid=$1 [QSA]
    ReWriteRule ^media/admin/(\w+).* media.php?do=admin_$1 [QSA]


    # Media Library from Video Directory
    RewriteCond %{QUERY_STRING} do=viewdetails&videoid=(\d+)
    RewriteRule ^video\.php$ media.php?do=details&mid=%1
    RewriteCond %{QUERY_STRING} viewcategory&categoryid=(\d+)
    RewriteRule ^video\.php$ media.php?do=category&cid=%1
    RewriteCond %{QUERY_STRING} viewuser&userid=(\d+)
    RewriteRule ^video\.php$ media.php?do=user&uid=%1
    RewriteCond %{QUERY_STRING} viewtag&tag=(.*)
    RewriteRule ^video\.php$ media.php?do=tag&tid=%1
    ReWriteRule ^video\.php$ media.php


    # Forum
    RewriteRule ^threads/.* showthread.php [QSA]
    RewriteRule ^forums/.* forumdisplay.php [QSA]
    RewriteRule ^members/.* member.php [QSA]
    RewriteRule ^blogs/.* blog.php [QSA]
    ReWriteRule ^entries/.* entry.php [QSA]


    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]


    # MVC
    RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]
    </ifmodule>


    RewriteBase /


    RewriteCond %{HTTP_HOST} ^www\.musclemecca\.com$
    RewriteRule ^(.*)$ https://musclemecca.com/$1 [L,R=301


    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]


    RewriteCond %{REQUEST_URI} !(notadmincp/|notmodcp/|cron|vbseo_sitemap|api\.php)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]


    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(notadmincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]


    allow from 72.200.166.190
    allow from 72.209.29.226


    # Black List
    deny from 124.6.181.177
    deny from 87.155.250.248
    deny from 24.140.43.87
    deny from 95.27.209.210
    deny from 203.147.88.166
    deny from 111.120.83.62
    deny from 121.54.64.29
    deny from 59.92.69.78
    deny from 122.173.221.53
    deny from 59.92.69.78
    deny from 95.43.78.64
    deny from 67.82.173.16
    deny from 24.210.247.95
    deny from 60.242.93.68
    deny from 67.1.5.196
    deny from 93.81.54.241
    deny from 78.14.192.52
    deny from 190.74.241.147
    deny from 115.73.41.192
    deny from 218.175.151.155
    deny from 199.21.99.69
    deny from 189.251.2.77
    deny from 60.242.85.35
    deny from 207.46.13.147
    deny from 121.218.178.119
    deny from 1.55.57.124
    deny from 1.52.0.0/14
    deny from 114.79.52.209
    deny from 173.234.29.168

  4. #4
    Member Array webdevoman's Avatar
    Real Name
    Rich Glaser Jr
    Join Date
    Aug 2012
    Location
    East Coast USA
    Posts
    45
    Liked
    0 times
    Hmmmm It has been days here. Is there anyone that can help me finish this? I did try to clean this up a bit but then I got the network error so I am overlooking something. Could you please provide a little detail on your post?

    Thank you

  5. #5
    vBSEO.com Webmaster Array Mert Gökçeimam's Avatar
    Real Name
    Lizard King
    Join Date
    Oct 2005
    Location
    Istanbul, Turkey, Turkey
    Posts
    23,463
    Liked
    721 times
    Blog Entries
    4
    Hello ,

    Did you follow what i suggested , and used vBSEO .htaccess file only ?
    Mert Gökçeimam / Crawlability Inc.

    vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
    Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!


    Twitter:@Depkac
    Personal Blog : Mert Gökçeimam

  6. #6
    vBSEO Staff Array Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,858
    Liked
    565 times
    Blog Entries
    2
    Hi Rich,

    My advise would be to use a simplified .htaccess, following this structure:

    * Rewrites
    * Optimizations
    * Denied IPs

    So it should look like this:


    ## Rewrites

    <ifmodule mod_rewrite.c>
    RewriteEngine On
    Options +FollowSymlinks

    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]


    # Media Library
    ReWriteRule ^media/m(\d+).*/tags$ media.php?do=tags_edit&mid=$1 [QSA]
    ReWriteRule ^media/m(\d+).*/edit$ media.php?do=details_edit&mid=$1 [QSA]
    ReWriteRule ^media/m(\d+).*/report$ media.php?do=report&mid=$1 [QSA]
    ReWriteRule ^media/m(\d+).*/c(\d+)$ media.php?do=comment_edit&cmt=$2 [QSA]
    ReWriteRule ^media/m(\d+).*/p(\d+).*$ media.php?do=details&mid=$1&pid=$2 [QSA]
    ReWriteRule ^media/m(\d+).* media.php?do=details&mid=$1 [QSA]
    ReWriteRule ^media/p(\d+).*/edit$ media.php?do=playlist_edit&pid=$1 [QSA]
    ReWriteRule ^media/p(\d+).* media.php?do=playlist&pid=$1 [QSA]
    ReWriteRule ^media/c(\d+).* media.php?do=category&cid=$1 [QSA]
    ReWriteRule ^media/u(\d+).* media.php?do=user&uid=$1 [QSA]
    ReWriteRule ^media/tag/(.*) media.php?do=tag&tid=$1 [QSA]
    ReWriteRule ^media/results/(.*) media.php?do=results&query=$1 [QSA]
    ReWriteRule ^media/advresults/(.*) media.php?do=advresults&query=$1 [QSA]
    ReWriteRule ^media/letter/(.*) media.php?do=letter&query=$1 [QSA]
    ReWriteRule ^media/browse.* media.php?do=browse [QSA]
    ReWriteRule ^media/search.* media.php?do=search [QSA]
    ReWriteRule ^media/random.* media.php?do=random [QSA]
    ReWriteRule ^media/submit.* media.php?do=submit [QSA]
    ReWriteRule ^media/tagcloud.* media.php?do=tagcloud [QSA]
    ReWriteRule ^media/playlists.* media.php?do=playlists [QSA]
    ReWriteRule ^media/pcreate.* media.php?do=playlists_create [QSA]
    ReWriteRule ^media/pmine.* media.php?do=playlists_mine [QSA]
    ReWriteRule ^media/favorites.* media.php?do=favorites [QSA]
    ReWriteRule ^media/subscriptions.* media.php?do=subscriptions [QSA]
    ReWriteRule ^media/admin/edit/s(\d+).* media.php?do=admin_host_edit&sid=$1 [QSA]
    ReWriteRule ^media/admin/delete/s(\d+).* media.php?do=admin_host_delete&sid=$1 [QSA]
    ReWriteRule ^media/admin/export/s(\d+).* media.php?do=admin_host_export&sid=$1 [QSA]
    ReWriteRule ^media/admin/(\w+).* media.php?do=admin_$1 [QSA]


    # Media Library from Video Directory
    RewriteCond %{QUERY_STRING} do=viewdetails&videoid=(\d+)
    RewriteRule ^video\.php$ media.php?do=details&mid=%1
    RewriteCond %{QUERY_STRING} viewcategory&categoryid=(\d+)
    RewriteRule ^video\.php$ media.php?do=category&cid=%1
    RewriteCond %{QUERY_STRING} viewuser&userid=(\d+)
    RewriteRule ^video\.php$ media.php?do=user&uid=%1
    RewriteCond %{QUERY_STRING} viewtag&tag=(.*)
    RewriteRule ^video\.php$ media.php?do=tag&tid=%1
    ReWriteRule ^video\.php$ media.php


    # vBSEO rules

    #RewriteBase /

    RewriteCond %{HTTP_HOST} !^musclemecca\.com
    RewriteRule (.*) https://musclemecca.com/$1 [L,R=301]

    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

    RewriteCond %{REQUEST_URI} !(notadmincp/|notmodcp/|cron|vbseo_sitemap|api\.php)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(notadmincp|notmodcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]


    ## Optimization

    # Expires

    <ifModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 1 seconds"
    ExpiresByType text/html "access plus 1 seconds"
    ExpiresByType image/gif "access plus 3456000 seconds"
    ExpiresByType image/jpeg "access plus 3456000 seconds"
    ExpiresByType image/png "access plus 3456000 seconds"
    ExpiresByType text/css "access plus 3456000 seconds"
    ExpiresByType text/javascript "access plus 3456000 seconds"
    ExpiresByType application/javascript "access plus 3456000 seconds"
    ExpiresByType application/x-javascript "access plus 3456000 seconds"
    </ifModule>


    # Compression

    <ifmodule mod_headers.c>
    <ifmodule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/css text/xml application/x-javascript
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    </ifmodule>
    </ifmodule>


    ## Denied and allowed IPs

    # Whitelist

    allow from 72.200.166.190
    allow from 72.209.29.226

    # Black List
    deny from 124.6.181.177
    deny from 87.155.250.248
    deny from 24.140.43.87
    deny from 95.27.209.210
    deny from 203.147.88.166
    deny from 111.120.83.62
    deny from 121.54.64.29
    deny from 59.92.69.78
    deny from 122.173.221.53
    deny from 59.92.69.78
    deny from 95.43.78.64
    deny from 67.82.173.16
    deny from 24.210.247.95
    deny from 60.242.93.68
    deny from 67.1.5.196
    deny from 93.81.54.241
    deny from 78.14.192.52
    deny from 190.74.241.147
    deny from 115.73.41.192
    deny from 218.175.151.155
    deny from 199.21.99.69
    deny from 189.251.2.77
    deny from 60.242.85.35
    deny from 207.46.13.147
    deny from 121.218.178.119
    deny from 1.55.57.124
    deny from 1.52.0.0/14
    deny from 114.79.52.209
    deny from 173.234.29.168


    I've replaced this:

    RewriteCond %{HTTP_HOST} ^www\.musclemecca\.com$
    RewriteRule ^(.*)$ https://musclemecca.com/$1 [L,R=301

    with this (I believe you'll get better results):

    RewriteCond %{HTTP_HOST} !^musclemecca\.com
    RewriteRule (.*) https://musclemecca.com/$1 [L,R=301]


    I've removed the following code snippet, as it is utilized for vBulletin 4 friendly URLs (which you are not using ):

    Code:
    # Forum
    RewriteRule ^threads/.* showthread.php [QSA]
    RewriteRule ^forums/.* forumdisplay.php [QSA]
    RewriteRule ^members/.* member.php [QSA]
    RewriteRule ^blogs/.* blog.php [QSA]
    ReWriteRule ^entries/.* entry.php [QSA]
    
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    
    # MVC
    RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]

    I've commented out RewriteBase / directive. In most of cases, it is not needed, but if after turning it off the vBSEO URLs don't work anymore, try re-enabling it (remove the # character):

    Code:
    #RewriteBase /

    I highlighted the Admin CP and Mod CP directories in case you need to update them.


    I was just wondering if you actually need to run your whole site under https to have Facebook app up and running. Could you please clarify on that?

    Thanks!
    Andrés Durán / Crawlability Inc.
    ĦvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ĦAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


  7. #7
    Member Array webdevoman's Avatar
    Real Name
    Rich Glaser Jr
    Join Date
    Aug 2012
    Location
    East Coast USA
    Posts
    45
    Liked
    0 times
    No, I do not believe I need the entire site running https for the facebook plug in but many members were getting browser warnings when visiting the site before. They had to hit the exception to get in. I figure I must have lost tons of traffic because of this. I thought redirecting to the https would solve the issues..

    I appreciate your help with the httaccess. i have had issues working with it for years. I have a couple mods that I thought relied on some changes in the htaccess, media library and the video posting but it was a while ago and I cannot even remember the details..anyhow, this is why I did not want to just go and remove everything.

    At any rate, I do not think htaccess is going to solve all my issues..I am afraid I really killed my existing search index by changing the prefered url structure and by messing up the dammed urls. I just figured they would forward ok but I am getting tons of these not founds..


    showthread.php?p= 404 8/17/12
    2 member.php?u=2744 404 8/19/12
    3 660264-post94.html 404 8/19/12
    4 member.php?u=2021 404 8/18/12
    5 659933-post88.html 404 8/19/12
    6 member.php?u=1912 404 8/18/12
    7 member.php?u=1878 404 8/18/12
    8 member.php?u=14041 404 8/16/12
    9 665923-post33.html 404 8/19/12
    10 665847-post30.html 404 8/19/12
    11 665339-post16.html 404 8/19/12
    12 member.php?u=2897 404 8/19/12
    13 673829-post85.html 404 8/18/12
    14 625515-post39.html 404 8/18/12
    15 member.php?u=1641 404 8/18/12
    16 member.php?u=15 404 8/17/12
    17 member.php?u=160 404 8/17/12
    18 member.php?u=2571 404 8/19/12
    19 member.php?u=2537 404 8/19/12
    20 e reason why I wanrted the ceritif



    Any advice would be so appreciated.. Thanks again for your help..BTW-The errors above are one small section out of 191 pages. I have always used webmaster tools and before all this I had no crawling errors. After this happened I tried deleting the existing sitemaps and I regenerated and uploaded them thinking the urls were from before but no such luck. None of these urls are being redirected properly..


    EDIT-I am sorry for the sloppiness of this post. I just do not have the patience right now for proper grammar. i just wanted to say that the new htaccess is working ok so far. I am still trying to figure out what to do about the errors but I am one step closer to being set.

  8. #8
    Member Array webdevoman's Avatar
    Real Name
    Rich Glaser Jr
    Join Date
    Aug 2012
    Location
    East Coast USA
    Posts
    45
    Liked
    0 times
    I thought the htaccess you made worked but I just realized i was not using it. This one is causing the internal server error..not sure why..

    nevermind..I see..forgot to uncomment the rewritebase..

    OK-It works but now there is nothing forwarding the www...this one only forwards the non www..to https..

    I had to change this back

    I've replaced this:

    RewriteCond %{HTTP_HOST} ^www\.musclemecca\.com$
    RewriteRule ^(.*)$ https://musclemecca.com/$1 [L,R=301

    with this (I believe you'll get better results):

    RewriteCond %{HTTP_HOST} !^musclemecca\.com
    RewriteRule (.*) https://musclemecca.com/$1 [L,R=301]

  9. #9
    vBSEO.com Webmaster Array Mert Gökçeimam's Avatar
    Real Name
    Lizard King
    Join Date
    Oct 2005
    Location
    Istanbul, Turkey, Turkey
    Posts
    23,463
    Liked
    721 times
    Blog Entries
    4
    Please change :

    RewriteEngine On
    Options +FollowSymlinks

    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]

    with

    RewriteEngine On
    Options +FollowSymlinks

    Also you need to use non www redirect directly below

    Options +FollowSymlinks line
    Mert Gökçeimam / Crawlability Inc.

    vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
    Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!


    Twitter:@Depkac
    Personal Blog : Mert Gökçeimam

  10. #10
    Member Array webdevoman's Avatar
    Real Name
    Rich Glaser Jr
    Join Date
    Aug 2012
    Location
    East Coast USA
    Posts
    45
    Liked
    0 times
    Thank you so much for your time. I will give this a shot.


    Are you telling me to place

    RewriteCond %{HTTP_HOST} !^musclemecca\.com
    RewriteRule (.*) https://musclemecca.com/$1 [L,R=301]

    directly below
    Options +FollowSymlinks ???

    What about

    RewriteCond %{HTTP_HOST} ^www\.musclemecca\.com$
    RewriteRule ^(.*)$ https://musclemecca.com/$1 [L,R=301] ?????

  11. #11
    Senior Member Array
    Real Name
    Ged
    Join Date
    Dec 2006
    Location
    UK
    Posts
    609
    Liked
    27 times
    RewriteCond %{HTTP_HOST} !^musclemecca\.com rewrites www. to non www.

    RewriteCond %{HTTP_HOST} ^www\.musclemecca\.com$ rewrites non www. to www.

    iirc

  12. #12
    vBSEO.com Webmaster Array Mert Gökçeimam's Avatar
    Real Name
    Lizard King
    Join Date
    Oct 2005
    Location
    Istanbul, Turkey, Turkey
    Posts
    23,463
    Liked
    721 times
    Blog Entries
    4
    For non www in urls :

    RewriteCond %{HTTP_HOST} !^example\.com$
    RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
    Mert Gökçeimam / Crawlability Inc.

    vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
    Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!


    Twitter:@Depkac
    Personal Blog : Mert Gökçeimam

  13. #13
    Member Array webdevoman's Avatar
    Real Name
    Rich Glaser Jr
    Join Date
    Aug 2012
    Location
    East Coast USA
    Posts
    45
    Liked
    0 times
    I see now.. Thanks. Actually I see this much clearer now thanks to you guys. So I am pushing both to non www https.. Do I have to put both down?

    I want all urls forwarded to the non www version using https... is this possible?

  14. #14
    Member Array webdevoman's Avatar
    Real Name
    Rich Glaser Jr
    Join Date
    Aug 2012
    Location
    East Coast USA
    Posts
    45
    Liked
    0 times
    As per your instructions I have the following but this will not work..It will not forward the www.. also, I am confused about why I needed to move the redirects..what about the rewritebase? That also has to be moved under +FollowSymlinks??

    Would someone be kind enough to put this together for me the correct way? I am starting to get more confused than I was.. I understand redirects in general but I am unclear about forwarding the entire url www and non www to https.. If I do not though members get browser security warnings..


    Thanks

    This is what I put together using the instructions above..

    ## Rewrites

    <ifmodule mod_rewrite.c>
    RewriteEngine On
    Options +FollowSymlinks
    RewriteCond %{HTTP_HOST} !^musclemecca\.com
    RewriteRule (.*) https://musclemecca.com/$1 [L,R=301]




    # Media Library
    ReWriteRule ^media/m(\d+).*/tags$ media.php?do=tags_edit&mid=$1 [QSA]
    ReWriteRule ^media/m(\d+).*/edit$ media.php?do=details_edit&mid=$1 [QSA]
    ReWriteRule ^media/m(\d+).*/report$ media.php?do=report&mid=$1 [QSA]
    ReWriteRule ^media/m(\d+).*/c(\d+)$ media.php?do=comment_edit&cmt=$2 [QSA]
    ReWriteRule ^media/m(\d+).*/p(\d+).*$ media.php?do=details&mid=$1&pid=$2 [QSA]
    ReWriteRule ^media/m(\d+).* media.php?do=details&mid=$1 [QSA]
    ReWriteRule ^media/p(\d+).*/edit$ media.php?do=playlist_edit&pid=$1 [QSA]
    ReWriteRule ^media/p(\d+).* media.php?do=playlist&pid=$1 [QSA]
    ReWriteRule ^media/c(\d+).* media.php?do=category&cid=$1 [QSA]
    ReWriteRule ^media/u(\d+).* media.php?do=user&uid=$1 [QSA]
    ReWriteRule ^media/tag/(.*) media.php?do=tag&tid=$1 [QSA]
    ReWriteRule ^media/results/(.*) media.php?do=results&query=$1 [QSA]
    ReWriteRule ^media/advresults/(.*) media.php?do=advresults&query=$1 [QSA]
    ReWriteRule ^media/letter/(.*) media.php?do=letter&query=$1 [QSA]
    ReWriteRule ^media/browse.* media.php?do=browse [QSA]
    ReWriteRule ^media/search.* media.php?do=search [QSA]
    ReWriteRule ^media/random.* media.php?do=random [QSA]
    ReWriteRule ^media/submit.* media.php?do=submit [QSA]
    ReWriteRule ^media/tagcloud.* media.php?do=tagcloud [QSA]
    ReWriteRule ^media/playlists.* media.php?do=playlists [QSA]
    ReWriteRule ^media/pcreate.* media.php?do=playlists_create [QSA]
    ReWriteRule ^media/pmine.* media.php?do=playlists_mine [QSA]
    ReWriteRule ^media/favorites.* media.php?do=favorites [QSA]
    ReWriteRule ^media/subscriptions.* media.php?do=subscriptions [QSA]
    ReWriteRule ^media/admin/edit/s(\d+).* media.php?do=admin_host_edit&sid=$1 [QSA]
    ReWriteRule ^media/admin/delete/s(\d+).* media.php?do=admin_host_delete&sid=$1 [QSA]
    ReWriteRule ^media/admin/export/s(\d+).* media.php?do=admin_host_export&sid=$1 [QSA]
    ReWriteRule ^media/admin/(\w+).* media.php?do=admin_$1 [QSA]




    # Media Library from Video Directory
    RewriteCond %{QUERY_STRING} do=viewdetails&videoid=(\d+)
    RewriteRule ^video\.php$ media.php?do=details&mid=%1
    RewriteCond %{QUERY_STRING} viewcategory&categoryid=(\d+)
    RewriteRule ^video\.php$ media.php?do=category&cid=%1
    RewriteCond %{QUERY_STRING} viewuser&userid=(\d+)
    RewriteRule ^video\.php$ media.php?do=user&uid=%1
    RewriteCond %{QUERY_STRING} viewtag&tag=(.*)
    RewriteRule ^video\.php$ media.php?do=tag&tid=%1
    ReWriteRule ^video\.php$ media.php




    # vBSEO rules


    #RewriteBase /






    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]


    RewriteCond %{REQUEST_URI} !(notadmincp/|notmodcp/|cron|vbseo_sitemap|api\.php)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]


    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(notadmincp|notmodcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]




    ## Optimization


    # Expires


    <ifModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 1 seconds"
    ExpiresByType text/html "access plus 1 seconds"
    ExpiresByType image/gif "access plus 3456000 seconds"
    ExpiresByType image/jpeg "access plus 3456000 seconds"
    ExpiresByType image/png "access plus 3456000 seconds"
    ExpiresByType text/css "access plus 3456000 seconds"
    ExpiresByType text/javascript "access plus 3456000 seconds"
    ExpiresByType application/javascript "access plus 3456000 seconds"
    ExpiresByType application/x-javascript "access plus 3456000 seconds"
    </ifModule>




    # Compression


    <ifmodule mod_headers.c>
    <ifmodule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/css text/xml application/x-javascript
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    </ifmodule>
    </ifmodule>




    ## Denied and allowed IPs


    # Whitelist


    allow from 72.200.166.190
    allow from 72.209.29.226


    # Black List
    deny from 124.6.181.177
    deny from 87.155.250.248
    deny from 24.140.43.87
    deny from 95.27.209.210
    deny from 203.147.88.166
    deny from 111.120.83.62
    deny from 121.54.64.29
    deny from 59.92.69.78
    deny from 122.173.221.53
    deny from 59.92.69.78
    deny from 95.43.78.64
    deny from 67.82.173.16
    deny from 24.210.247.95
    deny from 60.242.93.68
    deny from 67.1.5.196
    deny from 93.81.54.241
    deny from 78.14.192.52
    deny from 190.74.241.147
    deny from 115.73.41.192
    deny from 218.175.151.155
    deny from 199.21.99.69
    deny from 189.251.2.77
    deny from 60.242.85.35
    deny from 207.46.13.147
    deny from 121.218.178.119
    deny from 1.55.57.124
    deny from 1.52.0.0/14
    deny from 114.79.52.209
    deny from 173.234.29.168


    Can anyone help me finish this? I have been trying to finish this for days.. I am almost done with the htaccess. I really wanted to solve these issues within a fast time frame, especially the not found errors which is why I even filled out a support ticket. 2 days later and still no reply.

  15. #15
    vBSEO.com Webmaster Array Mert Gökçeimam's Avatar
    Real Name
    Lizard King
    Join Date
    Oct 2005
    Location
    Istanbul, Turkey, Turkey
    Posts
    23,463
    Liked
    721 times
    Blog Entries
    4
    Can you please create a support ticket with login information so we can check this further.
    Mert Gökçeimam / Crawlability Inc.

    vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
    Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!


    Twitter:@Depkac
    Personal Blog : Mert Gökçeimam

Page 1 of 2 1 2 LastLast

Similar Threads

  1. problem with .htaccess??
    By sjd996 in forum Troubleshooting
    Replies: 6
    Last Post: 04-02-2009, 10:27 PM
  2. htaccess problem
    By m7shsh in forum Troubleshooting
    Replies: 1
    Last Post: 06-03-2008, 03:57 PM
  3. htaccess problem
    By Tech Guy in forum Troubleshooting
    Replies: 2
    Last Post: 01-03-2007, 05:47 PM
  4. Problem mit der .htaccess
    By rike1 in forum Deutsch
    Replies: 2
    Last Post: 07-29-2006, 06:19 AM
  5. htaccess file problem / vbseo problem
    By Bestgfe in forum Troubleshooting
    Replies: 6
    Last Post: 04-05-2006, 09:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •