Announcement

Collapse
No announcement yet.

Mod Rewrite Friendly URLs => .htaccess

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

  • TandyServices
    replied
    After I did your htaccess I was not able to edit the widgets or make a new article. Had to take out.

    Leave a comment:


  • ELWACHIMAN
    replied
    working for my tnks

    Leave a comment:


  • tonetu
    replied
    Originally posted by Katsue View Post
    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.




    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.
    thank you VERY much.. that was VERY helpful...

    Leave a comment:


  • kuyenmotdivad
    replied
    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>

    Leave a comment:


  • Katsue
    replied
    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 25 Nov '09, 3:54am.

    Leave a comment:


  • Charlie_Brown
    replied
    Even after the edit I get 404 page errors.

    Leave a comment:


  • tonetu
    replied
    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

    Leave a comment:


  • rizelim
    replied
    Thank you

    Leave a comment:


  • nubian
    replied
    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.

    Leave a comment:


  • tonetu
    replied
    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!

    Leave a comment:


  • smirkley
    replied
    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.

    Leave a comment:


  • icarusforde
    replied
    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. >.<

    Leave a comment:


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

    Leave a comment:


  • iettafune
    replied
    # 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!

    Leave a comment:


  • CeesT
    replied
    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.)

    Leave a comment:

Related Topics

Collapse

Working...
X