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.

"Page not found" apache2 mod_rewrite

edited July 2011 in Vanilla 2.0 - 2.8
I can't get the link working.
this is my /var/www/vainilla/.htaccess file:


RewriteEngine On

RewriteBase /vainilla
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]


the url exist:
http://127.0.0.1/vainilla/uploads/FileUpload/d6/a7df58f6be990391fb16cfd30bab05.zip

but when i access through the link:
http://127.0.0.1/vainilla/index.php?p=/uploads/FileUpload/d6/a7df58f6be990391fb16cfd30bab05.zip
i get 404.

what I'm doing wrong?
Tagged:

Answers

  • edited July 2011
    I have the same problem.

    After i'd upload any picture all that i can see only small preview. But when i trying to open it i get error that there is no such file (404). When i click on "Add picture to the message" it add link like this one
    " img src="/vanilla/index.php?p=/uploads//FileUpload/90/992a15508d32c56b645a856d71dc48.jpg" />".

    Is it right to add slash (/) TWICE after "uploads" folder? 0o.

    I try to edit it like

    "img src="/vanilla/index.php?p=/uploads/FileUpload/90/992a15508d32c56b645a856d71dc48.jpg" />

    but it didn't load picture.




    By the way, when i'm deleting any discussion i have error: "Not Found
    The requested URL /vanilla/discussions was not found on this server."
  • lucluc ✭✭
    It shouldn't go though index.php I think.
    Which version of v2 and addon are you using?

    I think I saw a fix for that in github unstable, so it might be in 2.0.18b2 (or later)
  • greenkid

    hey, are you sure that you wrote folder name right?
    /vainilla
  • edited July 2011
    It shouldn't go though index.php I think.
    Which version of v2 and addon are you using?

    I think I saw a fix for that in github unstable, so it might be in 2.0.18b2 (or later)
    thanks for answer. I had just download the last version of Vanilla anf FileUpload.
    Can you post here link to fix of this problem?
    As i got, there is smth wrong with links....

  • lucluc ✭✭
    I don't have this addon, and the github commit, well there's too many to check.
  • ))) lets start from the beginning? )))
  • i think this problem cause of apache rewrite engine... but i don't know where... in wich of configuration files...
  • lucluc ✭✭
    Get the latest versions (unstable). They have something to correct the bad links. (ie. it should use the url as you say, not the link).
  • edited July 2011
    I had try the last beta version. Problem didn't go out. I think problem in some options of Apache rewrite_mod. But i don't know where. I try to on and off this mod. Url changed to normally (i mean \upload\Files\ bla bla bla, without ?p=\upload\Files bla bla bla) but it didn't find files.... ((( don't know what to do...
  • can anyone help?
  • really there're working links added. I can open it like

    http://forum/uploads/FileUpload/90/992a15508d32c56b645a856d71dc48.jpg

    but it doesn't open by

    /vanilla/index.php?p=/uploads/FileUpload/90/992a15508d32c56b645a856d71dc48.jpg

    don't know why.....

    i think this problem isn't in link. maby some php configurations....
  • lucluc ✭✭
    edited July 2011
    After you said it wasn't OK for b2, I said to get the latest unstable.
  • edited July 2011
    I had tryed the last unstable version. But nothing changed.
  • edited July 2011
    Has there been a resolution to this problem? I am running into the same thing.
  • lucluc ✭✭
    Has there been a resolution to this problem? I am running into the same thing.
    as you posted on another discussion, here is the link to the core change:
    http://vanillaforums.org/discussion/comment/140612#Comment_140612
  • starting to hate vanilla. Did developers add their bugfix to new releases? I trying to fix php scripts by my hands, but nothing changed! Can anyone tell me on what platform it working correctly? (web server - Apache or Nginx or smth else, Version of php, Version of Vanilla, Version of FileUpload). I think that problem hiding in apache rewrite_mod. The up link didn't help in fixing my problem.
  • by the way - how to post here pictures? i want to show you what i'm doing and what result i'm get
  • I fixed it up adding the following 2 lines just below the RewriteBase:

    RewriteCond %{QUERY_STRING} ^p\=/(uploads/.*)$
    RewriteRule index.php %1 [L]

    Hope this work of for you! ;-)
Sign In or Register to comment.