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?
    adktramping ~ my happy place.

    "Whoever said practice makes perfect was an idiot. Humans can't be perfect because we're not machines." ~ Sam Gardner.

    Vote for your favorite feature requests and the bugs you want to see fixed.

  • #2
    I would add it to the start of the file before any of the vBulletin redirects.
    Vote for:

    - *Admin Settable Paid Subscription Reminder Timeframe*
    -
    *PM - Add ability to reply to originator only*
    - Add Admin ability to auto-subscribe users to specific channel(s)
    - "Quick Route" Interface...

    Comment


    • #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 demonstration site.
      vBulletin 5 API - Full / Mobile
      Vote for your favorite feature requests and the bugs you want to see fixed.

      Comment

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