Announcement

Collapse
No announcement yet.

Mod Rewrite Friendly URLs => .htaccess

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

  • #91
    Tonetu,

    No the vb4 suite doesn't come with a .htaccess file at all on my package that I downloaded. Hope that finally answers that question for you.
    Thanks,

    Peter

    Comment


    • #92
      Originally posted by tonetu View Post
      am using mac and the problem with it is all "." files like ".htaccess" getting hidden so i can't see it!
      so i have a question now "maybe it's a silly question" but i believe it's easy to answer

      my question is: when you guys downloaded vb 4.0, did you find ".htaccess" file or not? because i didn't find it and it might be hidden! or ".htaccess" file is not in the vb 4.0 zip files?

      thanks
      Originally posted by Peter_AUS View Post
      Tonetu,

      No the vb4 suite doesn't come with a .htaccess file at all on my package that I downloaded. Hope that finally answers that question for you.
      Incorrect, the .htaccess file is located in the do_not_upload' folder.

      Comment


      • #93
        Well a but silly then being there isn't it, as it specifically says don't upload, unless you need to, so didn't look there. But at least finally the question is answered Hey.

        So why wouldn't this file be in the upload directory, is that because normally on a working site there would already be the expectation of that file being there ?
        Thanks,

        Peter

        Comment


        • #94
          Originally posted by Peter_AUS View Post
          Well a but silly then being there isn't it, as it specifically says don't upload, unless you need to, so didn't look there. But at least finally the question is answered Hey.

          So why wouldn't this file be in the upload directory, is that because normally on a working site there would already be the expectation of that file being there ?
          You may have an existing .htaccess file on your website with required data in it, which you would delete if you copy this example file over it. Also if you do not want to use the mod-rewrite then you do not want to have this .htaccess in place. (You could use the 'vbulletin internal' friendly url's without the .htaccess file.)

          Comment


          • #95
            # Author: Matty Asia
            # Version 1.4
            # Downloaded from: http://www.vbulletin.com/forum/showthread.php?325798

            RewriteEngine On

            ### 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}
            is good for me :-D

            thanks!

            Comment


            • #96
              Thanks for the replies I am sure this will now clear it up for the person asking the question about the .htaccess file.
              Thanks,

              Peter

              Comment


              • #97
                nothing happen with this command in terminal...
                i tried it and nothing change! could you please tell me what does this command do?

                and my question still without answer, does (vb 4.0 zip file) in the download area in vbulletin.com have .htaccess or not? because am having a problem and it might be because there's no .htaccess file in my root!

                thanks
                .htaccess is something that you have to put there yourself - it doesnt come with the package, because it's specific to your server

                Edit: Ok, ignore this - it didnt actually take me to the last page of the thread, thought your post was the last one. >.<

                Comment


                • #98
                  Originally posted by nubian View Post
                  Incorrect, the .htaccess file is located in the do_not_upload' folder.
                  OK,... felt like a dolt and never looked there.

                  Anyway, on a virgin install minus a post or two,... the file gives a full 500 error when uploaded.

                  I know I have mod rewrite installed and enabled, but gives a 500 nonetheless.

                  Comment


                  • #99
                    well am still looking for .htaccess file in "do not upload" folder but nothing there!!

                    so you are saying that i could use friendly URL without .htaccess? or i have to use .htaccess file , if so, where can i find this file?

                    thanks guys!

                    Comment


                    • Originally posted by smirkley View Post
                      OK,... felt like a dolt and never looked there.

                      Anyway, on a virgin install minus a post or two,... the file gives a full 500 error when uploaded.

                      I know I have mod rewrite installed and enabled, but gives a 500 nonetheless.
                      Sorry, I'm unsure as to why you're getting a 500 error.
                      However, I'm not using the .htaccess file provided by vBulletin, I'm using MattyAsia's .htaccess file which works flawless on my system.
                      http://www.vbulletin.com/forum/showt...-URLs-htaccess
                      Try this and post your results.

                      Originally posted by tonetu View Post
                      well am still looking for .htaccess file in "do not upload" folder but nothing there!!
                      so you are saying that i could use friendly URL without .htaccess? or i have to use .htaccess file , if so, where can i find this file?
                      thanks guys!
                      vBulletin released two different versions of Beta 4.
                      Some issue in regards to the breaking of some CMS functionality called for say a 'Beta 4.01' if you will.
                      Try downloading the latest package and it should be in there, it has to be.

                      For the CMS, you must 'Clear CMS Cache' in order for the Friendly URLs to work.

                      Comment


                      • Thank you
                        Ahsenforum İslamic Community

                        Comment


                        • Originally posted by nubian View Post
                          vBulletin released two different versions of Beta 4.
                          Some issue in regards to the breaking of some CMS functionality called for say a 'Beta 4.01' if you will.
                          Try downloading the latest package and it should be in there, it has to be.

                          For the CMS, you must 'Clear CMS Cache' in order for the Friendly URLs to work.
                          could you please tell me where exactly i can find .htaccess? which folder? because i downloaded the latest package of suite and forum and i coudn't find it by using (smultron, to show hidden file in mac) "because all files start with (.) become hidden files"

                          just to be clear i should have to put .htaccess file into my root to use friendly URL or it should work even without .htaccess?

                          thanks

                          Comment


                          • Even after the edit I get 404 page errors.

                            Comment


                            • Originally posted by tonetu View Post
                              could you please tell me where exactly i can find .htaccess? which folder? because i downloaded the latest package of suite and forum and i coudn't find it by using (smultron, to show hidden file in mac) "because all files start with (.) become hidden files"
                              By using a Terminal, the command "ls -a" should display hidden files starting with a .

                              Here are the steps :
                              • Launch a terminal window
                              • Go to your vbulletin directory where your .htaccess should be ("cd toto" to go into the toto directory)
                              • Use the "ls -la" to display all files in this directory, including hidden files starting with a dot.


                              Originally posted by tonetu View Post
                              just to be clear i should have to put .htaccess file into my root to use friendly URL or it should work even without .htaccess?

                              thanks
                              You have three different Friendly URL mode in VB4 :
                              • Basic Friendly URL -> Do not require a .htaccess file
                              • Advanced Friendly URL -> Do not require a .htaccess file
                              • Mod Rewrite Friendly URL -> DOES require a .htaccess file


                              By the way, the last choice is the most powerfull but the harder to configure.
                              Last edited by Katsue; Wed 25th Nov '09, 4:54am.

                              Comment


                              • Have you guys noticed the .htaccess file as these lines twice?

                                Code:
                                RewriteCond %{REQUEST_FILENAME} -s [OR]
                                RewriteCond %{REQUEST_FILENAME} -l [OR]
                                RewriteCond %{REQUEST_FILENAME} -d
                                
                                RewriteRule ^.*$ - [NC,L]
                                I have edited my .htaccess file, what do you guys think.

                                It seems to be working very good on my test website.

                                Code:
                                <IfModule mod_rewrite.c>
                                   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} !-f [OR]
                                   RewriteCond %{REQUEST_FILENAME} !-d
                                   RewriteCond %{REQUEST_FILENAME} !/(clientscript|cpstyles|images|includes|packages|vb)/
                                   RewriteRule ^(.+)$ - [L,QSA]
                                
                                   RewriteRule ^threads/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) showthread.php?t=$1&page=$2&%{QUERY_STRING}
                                   RewriteRule ^forums/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) forumdisplay.php?f=$1&page=$2&%{QUERY_STRING}
                                   RewriteRule ^members/([0-9]+) member.php?u=$1&%{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}
                                </IfModule>

                                Comment

                                Related Topics

                                Collapse

                                Working...
                                X