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.
Options

[Bug] Pagination - index.php removed from URL when going to page 2

lamentlament
edited October 2013 in Vanilla 2.0 - 2.8

Hi all,

I'm running Version 2.0.18.4.

If you click here:

http://www.sadreminders.com/forum/index.php?p=/discussion/274/

then click page 2.

This only happens on this discussion and I'm not sure why.

When logged in, you can only see page 2. When you click page 1, you get an error because it takes you to:

http://www.sadreminders.com/forum/?p=/discussion/274/question-about-the-new-desertshorekoz-cd/p1

Here's a post with 74 replies, but doesn't have this issue.

http://www.sadreminders.com/forum/index.php?p=/discussion/4/introduce-yourself

Comments

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited October 2013

    You should upgrade to 2.0.18.8 for security reasons.

    Have you tried enabling RewriteURL?

    What does your htaccess file say ?

    That is a weird bug for sure if it is a bug.

    What plugins enabled?

    When you put your mouse over the link , the correct url shows in the activity bar in my browser, so the url is not pretty but looks fine. It would seem something is affecting it after clicking. It cuts the file name off.

  • Options
    lamentlament
    edited October 2013

    Thanks for the quick reply.

    Funny thing about my .htaccess.. I can't get it working the way I want it to.

    I want sadreminders.com/forum to redirect to www.sadreminders.com/forum.

    In my .htaccess, it will only redirect the top level sadreminders.com to www.sadreminders.com, and never sadreminders.com/forum to www.sadreminders.com/forum.

    Anyway, in my /forum folder, here's the htaccess: http://pastebin.com/vHJPd3H3

    and for my main site: http://pastebin.com/r3TL1QkZ

    And again.. this is only happening for this one thread.

    Plugins enabled:

    1. Embed Vanilla
    2. All Viewed
    3. BotStop
    4. Flagging
    5. Google Analytics
    6. Gravatar
    7. Minify
    8. Post Count
    9. Quotes
    10. Split / Merge
    11. Stop Forum Spam
    12. Vanilla Statistics
    13. WhosOnline
  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited October 2013

    Yea I saw that, about how you want the url to be www or straight, that you must do in your hosting area. There should be a place in there that let's you pick how you want it to show, this however it not likely the cause of the problem. You can ask you host or search their knowledge base to find out how or if they can do it for you.

    The htaccess file looks fine. Have you tried enabling RewriteUrl=True ?

    Go into conf/config.php and put

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

  • Options

    Where would I enable RewriteUrl=True?

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited October 2013

    Go into the control panel file manager where you host your forum, forum/conf/config.php and put this line in if you don't have it. If you do and it says False, change to True

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

    What this does is make the url without the index.php part. Makes it cleaner looking. It may help your problem.

  • Options

    Well that worked.. nice, thanks!

    Question is.. why did it work? :)

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited October 2013

    Well the htaccess file has RewriteEngine on, and you had RewriteUrl False , I would guess that was a conflict.

    I am glad it worked ! :)

  • Options

    Hmm.. I didn't change Vanilla's .htaccess file though.. came with the install.

    But I love the cleaner URLs.

    Thanks again!

    (and if you have any ideas about how I can get my .htacess configured correctly to do what I want it to do, message me). :)

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited October 2013

    Hmm.. I didn't change Vanilla's .htaccess file though

    Precisely, the htaccess file is saying RewriteUrl in the configuration you have. But In your config.php you had it on False. It is my belief, I may be wrong, that this was causing a problem.

    You are very Welcome !

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    About this :

    I want sadreminders.com/forum to redirect to www.sadreminders.com/forum

    It is the same thing you would be redirecting to the same thing. The only time this becomes an issue maybe is if you are on web 2 .

    But if you want the www then you need to change that in your control panel from where you host your files. There should be a panel where you can choose how you wish to display it. If not ask your host to change it for you or how to do it.

    ReDirecting means to somewhere else other than where it was.

    ReWriting means adding or removing something, in essence formatting something for looks.

  • Options
    x00x00 MVP
    edited October 2013

    Your server rules simply do not recognise index.php as directory index.

    you could add

    DirectoryIndex index.html index.php
    

    to the top of your .htaccess

    grep is your friend.

  • Options
    hbfhbf wiki guy? MVP

    @vrijvlinder said:
    About this :
    I want sadreminders.com/forum to redirect to www.sadreminders.com/forum

    you can do that through your htaccess file as well.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    I think this would do that, but I prefer having the host fix it from their end specially since one might have other stuff that you also want that same thing. Like for WP or other installs. What a hassle to have to change them htaccess too...

    RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
    RewriteCond %{HTTPS}s ^on(s)|
    RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
Sign In or Register to comment.