Announcement

Collapse
No announcement yet.

Moved forum directories - need to fix URLs

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

  • [Forum] Moved forum directories - need to fix URLs

    Our forum directory has been changed from /forum to root, and now old thread URLs are broken. Should that be fixed through .htaccess or is there a better way?

  • #2
    Admincp --> Site URL

    Comment


    • #3
      I'm talking about a solution that will preserve existing hard links from other sites.

      Comment


      • #4
        htaccess 301 redirect the best you can do afaik

        Comment


        • #5
          Do you know which rules I should use? This is my current .htaccess

          Code:
          RewriteEngine on
          
          
          ErrorDocument 404 /error/404.php  
          ErrorDocument 403 /error/403.php
          
          
          rewritecond %{http_host} ^myforum.com [nc]
          rewriterule ^(.*)$ http://www.myforum.com/$1 [r=301,nc]
          Last edited by JackieChun; Tue 18 Sep '12, 12:01pm.

          Comment


          • #6
            In your case( if you had in myforum.com/forum) it should look like this

            Code:
            rewritecond %{http_host} ^myforum.com/forum [nc] 
            rewriterule ^(.*)$ http://www.myforum.com/$1 [r=301,nc]

            Comment


            • #7
              That code takes all old links to the home page.

              Comment


              • #8
                Anyone else know the right way to formulate the rewrites?

                Comment

                Related Topics

                Collapse

                Working...
                X