Mod Rewrite Friendly URLs => .htaccess

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bergler
    Senior Member
    • Dec 2006
    • 560

    Here is one I was sent through a support ticket that didnt work on my server, maybe it will on someone elses,

    Code:
    # Author: Matty Asia
    # Version 1.6
    # Downloaded from: http://www.vbulletin.com/forum/showthread.php?325798
     
    RewriteEngine On
    Options +FollowSymLinks
     
    ### THIS IS A LITTLE EXTRA SECURITY AND CAN BE REMOVED
     
    RewriteRule ^includes/(.*) index.php
    RewriteRule ^vb/(.*) index.php
    RewriteRule ^packages/(.*) index.php
     
    ### THIS IS THE ACTUAL REWRITE
     
    RewriteRule ^threads/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) showthread.php?t=$1&page=$2&%{QUERY_STRING}
    RewriteRule ^members/([0-9]+) member.php?u=$1&%{QUERY_STRING}
    RewriteRule ^forums/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) forumdisplay.php?f=$1&page=$2&%{QUERY_STRING}
    RewriteRule ^blogs/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) blog.php?u=$1&page=$2&%{QUERY_STRING}
    RewriteRule ^entries/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) entry.php?b=$1&page=$2&%{QUERY_STRING}
    RewriteRule ^list/([^/]*/)([0-9]+) list.php?r=$1$2&%{QUERY_STRING}
    RewriteRule ^content/(.*) content.php?r=$1&%{QUERY_STRING}
    RewriteRule ^widget/config/([0-9]+) widget.php?r=config/$1&%{QUERY_STRING}

    Comment

    • Bergler
      Senior Member
      • Dec 2006
      • 560

      Still having some issues and the error url is this http://www.mysite.com/forums/forums/...er-Information any ideas as to why it has forums in twice?

      Comment

      • dondavis
        New Member
        • Feb 2009
        • 3

        Hello, thank you for file. But i have problem that i can't solve. When i turn on mod_rewrite urls. I get www.mysite.com/content/theme1 instead www.mysite.com. Help me please to fix it.

        Comment

        • Andrew Elkins
          Senior Member
          • Jun 2009
          • 290
          • 4.1.x

          See: http://www.vbulletin.com/forum/proje...?issueid=35139
          Andrew Elkins
          Former vBulletin Developer

          Please do not PM me for support, please use the support system.

          #1 rule before doing anything to a live site, Backup, Test and Re-Test.

          Comment

          • treyb
            New Member
            • Jun 2006
            • 24
            • 3.7.x

            widget configure does not work for me.

            Comment

            • sprattgraham
              New Member
              • Dec 2005
              • 26
              • 3.8.x

              Anyone on windows using Ionic's Isapi Rewrite Filter got it working?

              ASP / ASP.NET / PHP 5 / SQL 2005 / MySQL 5.x / DOTNETPANEL / SMARTERMAIL

              Comment

              • samiro
                Senior Member
                • Mar 2006
                • 333
                • 4.0.0

                It doesn't work for me ;(
                sent me to 404 page
                My Women's Forums:

                Comment

                • tunerclub.net
                  New Member
                  • Jan 2010
                  • 5
                  • 4.0.0

                  everything works for me except for the cms, which spits out a page not found error

                  Comment

                  • Markos1977
                    Senior Member
                    • Aug 2006
                    • 106
                    • 3.6.x

                    hi all i got this to work but now incited of rewriting the url like this http://www.scottishexoticreptilesfor...ile-forum.html
                    its rewriting it like this http://www.scottishexoticreptilesfor...-reptile-forum can anyone help me

                    Comment

                    • Trixi
                      Member
                      • Dec 2004
                      • 48
                      • 3.0.0 Beta 3

                      Originally posted by Bergler
                      Still having some issues and the error url is this http://www.mysite.com/forums/forums/...er-Information any ideas as to why it has forums in twice?
                      Same problem here.

                      Comment

                      • Iron Star
                        New Member
                        • Jul 2008
                        • 4
                        • 3.7.x

                        ...but no way for apache 1.3?

                        Comment

                        • Markos1977
                          Senior Member
                          • Aug 2006
                          • 106
                          • 3.6.x

                          i got my prob sorted i just bought VBSEO and that put my urls back to the way they were when i was on vb3.8.2

                          Comment

                          • Eng. Deeb
                            Member
                            • Mar 2008
                            • 41
                            • 3.6.x

                            hi all I want to make my url

                            insted of




                            to



                            or





                            how can I do it

                            without using vbseo only using vb way

                            Comment

                            • GrooveJunkie
                              New Member
                              • Mar 2010
                              • 7
                              • 4.0.0

                              id like to know the same, me thinks your better off paying $129 dollars foo VBSEO - so much easier and time saving just buying the plug in
                              Last edited by GrooveJunkie; Fri 5 Mar '10, 12:15pm.

                              Comment

                              • the_webmaster
                                Member
                                • Oct 2002
                                • 39

                                I used to have this :

                                PHP Code:
                                RewriteEngine on
                                # If you are having problems or are using VirtualDocumentRoot, uncomment  this line and set it to your vBulletin directory.
                                # RewriteBase /forum/
                                RewriteCond %{REQUEST_FILENAME} -[OR]
                                RewriteCond %{REQUEST_FILENAME} -[OR]
                                RewriteCond %{REQUEST_FILENAME} -d
                                RewriteRule 
                                ^.*$ - [NC,L]
                                # 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} -[OR]
                                RewriteCond %{REQUEST_FILENAME} -[OR]
                                RewriteCond %{REQUEST_FILENAME} -d
                                RewriteRule 
                                ^.*$ - [NC,L]
                                # MVC
                                RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$[QSA

                                I removed it and used your htaccess.

                                could you please tell me what the Different between them ? cause I do not have any clue
                                http://www.shmmr.net/vb/images/image...ar_add2007.gif

                                Comment

                                Related Topics

                                Collapse

                                Working...