Announcement

Collapse
No announcement yet.

htaccess redirect

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • htaccess redirect

    I'm not at all familiar working with htaccess. But I recently set my site to ssl and want to redirect. I have found the redirect code for http to https, but which htaccess file gets modified ( I assume the one in "upload" folder, or in my case "forum" directory. Then, does it matter where in the file the script is placed?
    Organizations must hire quality people — "If you hire stupid people, they are not going to get better over time," ~ Gordon Graham.

    vB Mods That Rock!

  • #3
    Originally posted by NumNum View Post
    I'm not at all familiar working with htaccess. But I recently set my site to ssl and want to redirect. I have found the redirect code for http to https, but which htaccess file gets modified ( I assume the one in "upload" folder, or in my case "forum" directory. Then, does it matter where in the file the script is placed?
    Here's an example, my .htaccess in case you need to peek. You want to mod the .htaccess in your root directory. I'd recommend backing it up first. If you mess up your site will go down.

    https://www.christforums.org/forum/e...le-performance

    The first three lines after "rewrite on" are my http to https.

    You may also want to check out Vbmods that rock too if you're using cloudflare. Can't remember if you mentioned that you were in the past. There's a tweak in there worth noting: https://vbmods.rocks/forum/vbulletin...cached-content

    Enjoy,
    William

    Comment


    • NumNum
      NumNum commented
      Editing a comment
      Thanks William!

  • #4
    This is the order of rewrites in the 5.3.0 .htaccess file:

    Code:
        #To redirect users to the secure version of your site, uncomment the lines below 
        #RewriteCond %{HTTPS} !=on
        #RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
    
        # Send css calls directly to the correct file VBV-7807
        RewriteRule ^css.php$ core/css.php [NC,L]
    
        # Redirect old install path to core.
        RewriteRule ^install/ core/install/ [NC,L]
    
        # Main Redirect
        RewriteCond %{REQUEST_URI} !\.(gif|jpg|jpeg|png|css)$
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php?routestring=$1 [L,QSA]
    
        # Because admincp is an actual directory.
        RewriteRule ^(admincp/)$ index.php?routestring=$1 [L,QSA]
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud customization and demonstration site.
    vBulletin 5 Documentation - Updated every Friday. Report issues here.
    vBulletin 5 API - Full / Mobile
    I am not currently available for vB Messenger Chats.

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X