Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: [SOLUTION] Problem with modrewrite  (Read 9092 times)

mattd

  • Full Member
  • ***
  • Karma: 0
  • Posts: 121
[SOLUTION] Problem with modrewrite
« on: September 10, 2006, 02:36:34 AM »

Hi,

There is a problem with the mdoreqrite in the .htaccess file.

For all my sites I have a webalizer directory.  Previously with 1.4 I could still access that.  However if I try that with 1.5 it doesn't work any more.

E.g. if you try to go to

http://www.computer-rage.com/webalizer

You dont get taken to the webalizer stats.  Instead you end up with what appears to be the category listing for my "general" category.  

Thanks,

Matt
Logged

mattd

  • Full Member
  • ***
  • Karma: 0
  • Posts: 121
[SOLUTION] Problem with modrewrite
« Reply #1 on: September 10, 2006, 01:52:27 PM »

I modified the .htaccess file by putting in this rule after the "RewriteEngine On" line:

Code: [Select]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1 [L]
Works fine now.
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
[SOLUTION] Problem with modrewrite
« Reply #2 on: September 10, 2006, 02:40:46 PM »

Thx for this Matt, it also solves my other problem Re: image/media directories.
Logged
Of all the things I have lost, it is my mind that I miss the most.

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[SOLUTION] Problem with modrewrite
« Reply #3 on: September 12, 2006, 08:25:50 PM »

Thanks Matt... it solved my problem #6 - image not displaying in FF. :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

tim0fee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 71
[SOLUTION] Problem with modrewrite
« Reply #4 on: September 15, 2006, 10:52:49 AM »

Thanks plenty @ mattd !

I had the same image problem also!

;-)

peace all,

tim0fee
Logged

celebro

  • Guest
[SOLUTION] Problem with modrewrite
« Reply #5 on: September 19, 2006, 09:09:27 PM »

Working on trying to find a solution for 1and1 hosting so far I have the following for my .htaccess

Code: [Select]

php_value session.use_trans_sid 0

RewriteEngine On
RewriteBase /
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 articlespage=$2 [L]
The home page and images now show up. However clicking on any of the new created categories, the css file is not being referenced.

Website is: http://4zero1.net/
Logged

Luka

  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 36
  • Posts: 1716
    • http://www.snewscms.com
[SOLUTION] Problem with modrewrite
« Reply #6 on: September 19, 2006, 09:35:42 PM »

Celebro, try to either write a full path to the css file in your index.php or try to rewrite base in .htaccess.
Logged

celebro

  • Guest
[SOLUTION] Problem with modrewrite
« Reply #7 on: September 19, 2006, 09:48:17 PM »

Quote from: Luka
Celebro, try to either write a full path to the css file in your index.php or try to rewrite base in .htaccess.
Thanks Luka, that did it... and modifications above to .htaccess everything is working fine so far... with 1and1

On another note,... I still have snews.us :)
Logged

Jason Kingery

  • Sr. Member
  • ****
  • Karma: 1
  • Posts: 298
    • http://denial-design.com
[SOLUTION] Problem with modrewrite
« Reply #8 on: September 29, 2006, 01:09:32 PM »

Yeah, this is a preemtive strike as well, for example, I'm working on a site, and I will need an events calendar. If I was to place it in a sub directory off of snews, then it wouldn't even allow you to install. Good work! ;)

Jochum Meester

  • Sr. Member
  • ****
  • Karma: 1
  • Posts: 309
    • JochumMeester.com
[SOLUTION] Problem with modrewrite
« Reply #9 on: October 08, 2006, 07:57:53 PM »

Quote from: mattd
I modified the .htaccess file by putting in this rule after the "RewriteEngine On" line:

Code: [Select]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1 [L]
Works fine now.
What does it do/add?
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[SOLUTION] Problem with modrewrite
« Reply #10 on: October 09, 2006, 12:57:36 AM »

JM - for me... and anyone else who uses IE6 as their general-use browser... it makes the Image button under the textareas for new_article and edit_article function properly and display the image where you place it - in sNews 1.5. If you fit into this user category, then you need it.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Jochum Meester

  • Sr. Member
  • ****
  • Karma: 1
  • Posts: 309
    • JochumMeester.com
[SOLUTION] Problem with modrewrite
« Reply #11 on: October 09, 2006, 07:30:56 AM »

I do :) Although I use Firefox at home, I have to use IE at school. Thanks for the update!
Logged

kastri

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
[SOLUTION] Problem with modrewrite
« Reply #12 on: October 23, 2006, 05:34:14 PM »

Hallo there,
I want to thank you for your help, I couldnt understand why my 1.5 version did not show the pictures although I use linux apache and had granted perms to the img folder..
but with your fixed htaccess code it worked.

This is true democracy and liberty, giving and sharing for a better world...
Logged