Help with 301 redirects.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EthnicLover
    Confirmed User
    • Feb 2007
    • 1584

    #1

    Help with 301 redirects.

    Is this the exact correct code for permanently redirecting individual pages through the .htaccess file?:

    RewriteEngine On
    Redirect 301 /main.html http://www.mysite.com/main.php

    If I have many individual pages to redirect do I do this?:

    RewriteEngine On
    Redirect 301 /main.html http://www.mysite.com/main.php
    Redirect 301 /tits.html http://www.mysite.com/tits.php
    Redirect 301 /ass.html http://www.mysite.com/ass.php
    Redirect 301 /teens.html http://www.mysite.com/teens.php
    Redirect 301 /videobox.html http://www.mysite.com/video-box.php

    Any help would be awesome. I also have the option through my hosting control panel to input one domain at a time for 301 redirects. I would prefer to learn this myself so any guidance is appreciated.


    Honest adult reviews? - Adult Reviews
    Ethnic paysite owners? - Get reviewed
    Follow me? - Twitter Porn
  • EthnicLover
    Confirmed User
    • Feb 2007
    • 1584

    #2
    I knew I should have put BOOBS in the title.

    Can anyone help? With the 301 issue that is.


    Honest adult reviews? - Adult Reviews
    Ethnic paysite owners? - Get reviewed
    Follow me? - Twitter Porn

    Comment

    • EthnicLover
      Confirmed User
      • Feb 2007
      • 1584

      #3
      Any help with this issue?


      Honest adult reviews? - Adult Reviews
      Ethnic paysite owners? - Get reviewed
      Follow me? - Twitter Porn

      Comment

      • The Sultan Of Smut
        Confirmed User
        • Dec 2004
        • 4325

        #4
        You'll find some better ways here:
        http://www.google.com/search?q=htacc...ct+html+to+php

        Comment

        • Killswitch - BANNED FOR LIFE

          #5
          Are you pretty much just redirecting .html files to the equivalent .php file?

          Comment

          • EthnicLover
            Confirmed User
            • Feb 2007
            • 1584

            #6
            The first page for the Google search is this:

            http://www.webweaver.nu/html-tips/web-redirection.shtml

            It gives the same example that I wrote in this thread for redirecting a single/individual page:

            Redirect 301 /oldpage.html http://www.example.com/newpage.html

            I am changing all html files to php but a lot of the new files are named differently. For example:

            8thstreetlatinas.html to 8th-street-latinas.php

            Therefore should I use the initial example I used which seems to be the same as the one above?

            Thanks.


            Honest adult reviews? - Adult Reviews
            Ethnic paysite owners? - Get reviewed
            Follow me? - Twitter Porn

            Comment

            • woj
              <&(©¿©)&>
              • Jul 2002
              • 47882

              #7
              Why are you redirecting form .html to .php anyway?
              Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
              Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
              Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

              Comment

              • Killswitch - BANNED FOR LIFE

                #8
                Originally posted by EthnicLover
                The first page for the Google search is this:

                http://www.webweaver.nu/html-tips/web-redirection.shtml

                It gives the same example that I wrote in this thread for redirecting a single/individual page:

                Redirect 301 /oldpage.html http://www.example.com/newpage.html

                I am changing all html files to php but a lot of the new files are named differently. For example:

                8thstreetlatinas.html to 8th-street-latinas.php

                Therefore should I use the initial example I used which seems to be the same as the one above?

                Thanks.
                You can do regex to redirect from .html to .php but for the renamed files, you'll have to put them in like you currently do.

                Regex version is
                Redirect 301 /(.*).html http://www.example.com/$1.php

                Comment

                • Aric
                  Confirmed User
                  • Sep 2002
                  • 1209

                  #9
                  Why not just let PHP parse .html?

                  Code:
                  RemoveHandler .html .htm
                  AddType application/x-httpd-php .php .htm .html
                  Awesome cloud hosting by DigitalOcean

                  Comment

                  • EthnicLover
                    Confirmed User
                    • Feb 2007
                    • 1584

                    #10
                    Originally posted by Killswitch
                    You can do regex to redirect from .html to .php but for the renamed files, you'll have to put them in like you currently do.

                    Regex version is
                    Redirect 301 /(.*).html http://www.example.com/$1.php
                    Thanks for the info. Since most of my pages are now in different folders and have different names it looks like I will have to do the Redirect 301 for the majority.

                    By doing the 301 redirect there should be no loss of Search Engine rankings, correct?

                    Thanks.


                    Honest adult reviews? - Adult Reviews
                    Ethnic paysite owners? - Get reviewed
                    Follow me? - Twitter Porn

                    Comment

                    • Killswitch - BANNED FOR LIFE

                      #11
                      Originally posted by EthnicLover
                      Thanks for the info. Since most of my pages are now in different folders and have different names it looks like I will have to do the Redirect 301 for the majority.

                      By doing the 301 redirect there should be no loss of Search Engine rankings, correct?

                      Thanks.
                      No, 301 tells the search engines that the file has moved, and to replace it with the new location.

                      Comment

                      Working...