Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

/index.php?p=/

NikyNiky New
edited June 2015 in Vanilla 2.0 - 2.8


Hello, someone know if it's possible to remove this ? (You will see in photo)
I had vanilla forum 1 day ago but i changed my website host and installed vanilla again but on my first forum this thing not occur. I want to make when I enter on any page to show on link ex '/categories/general' and not 'index.php?p=/categories/general'

Comments

  • You are looking to enable pretty URLs. Add the following to /conf/config.php:

    $Configuration['Garden']['RewriteUrls'] = '1';
    

    If your forum now breaks, you probably don't have the mod_rewrite enabled in your PHP settings. Work with your host to enable it.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • @hgtonight said:
    You are looking to enable pretty URLs. Add the following to /conf/config.php:

    $Configuration['Garden']['RewriteUrls'] = '1';
    

    If your forum now breaks, you probably don't have the mod_rewrite enabled in your PHP settings. Work with your host to enable it.

    I use host from 000webhost can you help me please? I don't know how to enable mod_rewrite . I'm new in this domain :) please help me.

  • Now my forum is broken.. I can't fix it?

  • @Niky said:
    Now my forum is broken.. I can't fix it?

    @hgtonight said:
    If your forum now breaks, you probably don't have the mod_rewrite enabled in your PHP settings. Work with your host to enable it.

    Emphasis added.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • @hgtonight said:
    Emphasis added.

    No problem but I want only to know how to enable mod_rewrite :(

  • @Niky said:
    No problem but I want only to know how to enable mod_rewrite :(

    Ask your host. File a support ticket with them.

    I am guessing they will not enable it for a free account.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • @hgtonight said:
    I am guessing they will not enable it for a free account.

    Staff from My Host said:

    Hello,

    mod_rewrite is enabled by default on our servers.

    Thank you for using our services,
    Helpdesk Staff

  • Please enable debugging (add $Configuration['Debug'] = true; to /conf/config.php and report any error you receive.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • NikyNiky New
    edited June 2015

    @hgtonight said:
    Please enable debugging (add $Configuration['Debug'] = true; to /conf/config.php and report any error you receive.

    I get this on index footer

    Debug Trace

    Info Need to re-index theme cache
    Info Need to re-index plugin cache

    But I have reinstalled my vanilla forum after it has been broken.

  • Post the contents of your htaccess file

  • NikyNiky New
    edited June 2015

    @vrijvlinder said:
    Post the contents of your htaccess file

    # Original
    # If you modify this file then change the above line to: # Modified
    IfModule mod_rewrite.c
    RewriteEngine On
    # Certain hosts may require the following line.
    # If vanilla is in a subfolder then you need to specify it after the /.
    # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
    # RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]

  • Change this # RewriteBase /

    To this RewriteBase /

  • @vrijvlinder said:
    Change this # RewriteBase /

    To this RewriteBase /

    I changed and nothing.. When I enter in General discussions or other it's show me on link : index.php?p=/categories/general

  • edited June 2015

    This goes in the config.php

    $Configuration['Garden']['RewriteUrls'] =TRUE;

  • You have to be careful when you put things in the config.php you can break your forum if you don't pay attention to detail in the explanations given. Read the tutorial section here...

  • @vrijvlinder said:
    You have to be careful when you put things in the config.php you can break your forum if you don't pay attention to detail in the explanations given. Read the tutorial section here...

    Thank you so so so much man :) I solved in 2 days WOW thank you thank you thank you :)

  • @Niky said:
    Thank you so so so much man :) I solved in 2 days WOW thank you thank you thank you :)

    Could you tell me how to solve that problem :)

  • peregrineperegrine MVP
    edited August 2015

    Wu Zhu said: Could you tell me how to solve that problem :)

    he corrected his .htaccess and fixed the ReWrite base to point to the correct folder

    and made sure he had this set correctly in config.php

    $Configuration['Garden']['RewriteUrls'] =TRUE;

    Question 22 in the FAQ.

    http://vanillaforums.org/discussion/comment/220157/#Comment_220157

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • This is very simple just add a line in config.php

    $Configuration['Garden']['RewriteUrls'] =TRUE;

    and this is my .htaccess file ( I did not change anything)

    Original

    If you modify this file then change the above line to: # Modified


    RewriteEngine On
    # Certain hosts may require the following line.
    # If vanilla is in a subfolder then you need to specify it after the /.
    # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
    #RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]

  • Change this

    #RewriteBase /

    To This

    RewriteBase /

    If your forum is in yoursite.com/forum then add this

    RewriteBase /forum

Sign In or Register to comment.