Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: [SOLVED] Problem with mod_rewrite -- 404 errors in admin panel  (Read 6622 times)

lolidon

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
[SOLVED] Problem with mod_rewrite -- 404 errors in admin panel
« on: October 31, 2007, 01:00:17 AM »

Hello,

the site works fine when i look at categories. when i go to the admin panel, it does not -- it gives a 404 (i can get to the panel, but clicking settings and new article gives me a 404). furthermore, the 404 is not a server 404, it's a snews 404 -- the content area says that the content could not be found.

thanks!
« Last Edit: November 01, 2007, 04:52:55 AM by philmoz »
Logged

jlhaslip

  • Sr. Member
  • ****
  • Karma: 16
  • Posts: 374
    • My snews with AEF Forum site
Re: Problem with mod_rewrite -- 404 errors in admin panel
« Reply #1 on: October 31, 2007, 06:30:18 AM »

What is the URL to your site?
And have you altered the .htaccess at all?
If your snews is not in the root of your account, you will need to remove the '#' and alter the folder path in this line of the .htaccess:
Code: [Select]
#RewriteBase /snews16/
« Last Edit: October 31, 2007, 06:34:44 AM by jlhaslip »
Logged
Yes! I have no siggy.

lolidon

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: Problem with mod_rewrite -- 404 errors in admin panel
« Reply #2 on: October 31, 2007, 09:53:15 PM »

Hello, the site is at: http://www.forthelose.org

.htaccess is:
Code: [Select]
<IfModule mod_php4.c>
    php_value session.use_trans_sid 0
</IfModule>
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
RewriteEngine On
# RewriteBase public_html/ftl/
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?category=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+) index.php?category=$1&title=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+)/([^/]+)/ index.php?category=$1&title=$2&commentspage=$3 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9_-]+)/([0-9]+)/ index.php?category=$1&nbsp;articlespage=$2 [L]

snews index.php is in /home/atlantis/public_html/ftl/ (also the root of the domain)

When i uncommented rewrite base, the site gave an internal server error.
Logged

jlhaslip

  • Sr. Member
  • ****
  • Karma: 16
  • Posts: 374
    • My snews with AEF Forum site
Re: Problem with mod_rewrite -- 404 errors in admin panel
« Reply #3 on: October 31, 2007, 09:56:01 PM »

try

RewriteBase /ftl/

Logged
Yes! I have no siggy.

lolidon

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: Problem with mod_rewrite -- 404 errors in admin panel
« Reply #4 on: October 31, 2007, 11:26:58 PM »

I tried that -- the front page works, but the links do not. I get a 500 internal server again =/
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Problem with mod_rewrite -- 404 errors in admin panel
« Reply #5 on: October 31, 2007, 11:40:56 PM »

is htaccess in same directory as your index.php and snews.php.

If so, this
Quote
#RewriteBase /snews16/
should be this
Quote
RewriteBase /
Logged
Of all the things I have lost, it is my mind that I miss the most.

lolidon

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: Problem with mod_rewrite -- 404 errors in admin panel
« Reply #6 on: November 01, 2007, 12:06:31 AM »

Yes, .htaccess is in the same directory. Rewritebase / does not cause internal server errors, but does not fix the problem. I still get this error from sNews: "Requested contents could not be found. Please go back or use the search feature."

In the main content area...

Try it, http://www.forthelose.org admin button is in the first post (login), username password test/test
Logged

jlhaslip

  • Sr. Member
  • ****
  • Karma: 16
  • Posts: 374
    • My snews with AEF Forum site
Re: Problem with mod_rewrite -- 404 errors in admin panel
« Reply #7 on: November 01, 2007, 01:41:24 AM »

Are all of the links in the left side bar created from within sNerws16 or are they static html/php pages from outside the snews framework?
Logged
Yes! I have no siggy.

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Problem with mod_rewrite -- 404 errors in admin panel
« Reply #8 on: November 01, 2007, 01:41:54 AM »

have you put the snews call for title function in index.php?
If not, it may, repeat may be what is causing this.

Code: [Select]
<?php title(); ?>.This will also put in a site wide base url, which the htaccess may be expecting.

Having a look at your source, it would seem that you are perhaps only just making headway in porting over to snews.
Suggest, if you haven't already, reading this.
http://snewscms.com/designers-guide/template-tags/
Logged
Of all the things I have lost, it is my mind that I miss the most.

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Problem with mod_rewrite -- 404 errors in admin panel
« Reply #9 on: November 01, 2007, 01:43:19 AM »

Are all of the links in the left side bar created from within sNerws16 or are they static html/php pages from outside the snews framework?
Going by the source, they look very static. The categories function outputs a list type menu, but this page is using <br> to force new lines.

but that said, there is no access to backend without throwing a snews 404.
It is most likely that things have not been set up in the template as it should... and the title function is a very important one to use.
« Last Edit: November 01, 2007, 01:47:00 AM by philmoz »
Logged
Of all the things I have lost, it is my mind that I miss the most.

jlhaslip

  • Sr. Member
  • ****
  • Karma: 16
  • Posts: 374
    • My snews with AEF Forum site
Re: Problem with mod_rewrite -- 404 errors in admin panel
« Reply #10 on: November 01, 2007, 01:51:37 AM »

And there are no articles/categories/pages available inside the Admin panel. That was the clue that prompted me to ask the question.
Logged
Yes! I have no siggy.

lolidon

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: Problem with mod_rewrite -- 404 errors in admin panel
« Reply #11 on: November 01, 2007, 02:01:24 AM »

The links in the sidebar _are_ dynamic; I remember modifying the snews output a bit to not use li (list item) tags. The title(); function fixed everything -- thanks a lot. I wouldn't have caught the error in a thousand years.

Thanks again -- you saved a lot of headache =) =) =)
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Problem with mod_rewrite -- 404 errors in admin panel
« Reply #12 on: November 01, 2007, 04:52:18 AM »

No probs.
Logged
Of all the things I have lost, it is my mind that I miss the most.