Announcement

Collapse
No announcement yet.

Mod Rewrite Friendly URLs => .htaccess

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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


    • 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


      • 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


        • 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


          • widget configure does not work for me.

            Comment


            • 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


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

                Comment


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

                  Comment


                  • 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


                    • Originally posted by Bergler View Post
                      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


                      • ...but no way for apache 1.3?

                        Comment


                        • 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


                          • hi all I want to make my url

                            insted of

                            http://arabiphones.com/f/threads/72-...A8%D8%AF%D8%B1


                            to

                            http://arabiphones.com/f/threads/72

                            or

                            http://arabiphones.com/f/t72



                            how can I do it

                            without using vbseo only using vb way

                            Comment


                            • 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 5th Mar '10, 1:15pm.

                              Comment


                              • 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...
                                X