LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Rewrite all 404s

Reply
 
Thread Tools Display Modes
  #1  
Old 01-29-2013, 04:45 AM
techieanalyst techieanalyst is offline
New Member
 
Join Date: Dec 2012
Posts: 7
Default Rewrite all 404s

Im running IPBoards 3.4.2 and I need this problem solved and they've already pretty much pointed at the webserver

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule \.(jpeg|jpg|gif|png)$ /public/404.php [NC,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

All sites come back as 404, what should I set on my listener/server side in the GUI to make this work
Reply With Quote
  #2  
Old 01-29-2013, 10:09 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
Quote:
Originally Posted by techieanalyst View Post
Im running IPBoards 3.4.2 and I need this problem solved and they've already pretty much pointed at the webserver

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule \.(jpeg|jpg|gif|png)$ /public/404.php [NC,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

All sites come back as 404, what should I set on my listener/server side in the GUI to make this work
enable rewrite logging (Add 'RewriteLogLevel 9' in vhost section of httpd.conf) and grep 'REWRITE' entries from /usr/local/apache/logs/error_log to see what is going on.
Reply With Quote
  #3  
Old 01-30-2013, 06:31 AM
techieanalyst techieanalyst is offline
New Member
 
Join Date: Dec 2012
Posts: 7
The only httpd.conf found on my server was at

/usr/local/lsws/add-ons/frontpage/conf

Its totally empty

Apache has never been installed on the server, this is a dedicated server I put together myself
Reply With Quote
  #4  
Old 01-30-2013, 06:39 AM
techieanalyst techieanalyst is offline
New Member
 
Join Date: Dec 2012
Posts: 7
These are the errors Im getting with the log level set to 9

2013-01-30 10:36:12.740 [INFO] [10.1.1.156:50369-4#Techie] [REWRITE] Rule: Match '/forums/' with pattern '\.(jpeg|jpg|gif|png)$', result: -1
2013-01-30 10:36:12.740 [INFO] [10.1.1.156:50369-4#Techie] [REWRITE] Rule: Match '/forums/' with pattern '.', result: 1
2013-01-30 10:36:12.740 [INFO] [10.1.1.156:50369-4#Techie] [REWRITE] stat( /usr/local/lsws/DEFAULT/html/forums ) failed
2013-01-30 10:36:12.740 [INFO] [10.1.1.156:50369-4#Techie] [REWRITE] stat( /usr/local/lsws/DEFAULT/html/forums ) failed
2013-01-30 10:36:12.740 [INFO] [10.1.1.156:50369-4#Techie] [REWRITE] Source URI: '/forums/' => Result URI: '/index.php'
2013-01-30 10:36:12.740 [INFO] [10.1.1.156:50369-4#Techie] [REWRITE] Last Rule, stop!
2013-01-30 10:36:12.836 [INFO] [10.1.1.156:50369-5#Techie] [REWRITE] Rule: Match '/forums' with pattern '\.(jpeg|jpg|gif|png)$', result: -1
2013-01-30 10:36:12.836 [INFO] [10.1.1.156:50369-5#Techie] [REWRITE] Rule: Match '/forums' with pattern '.', result: 1
2013-01-30 10:36:12.836 [INFO] [10.1.1.156:50369-5#Techie] [REWRITE] stat( /usr/local/lsws/DEFAULT/html/forums ) failed
2013-01-30 10:36:12.836 [INFO] [10.1.1.156:50369-5#Techie] [REWRITE] stat( /usr/local/lsws/DEFAULT/html/forums ) failed
2013-01-30 10:36:12.836 [INFO] [10.1.1.156:50369-5#Techie] [REWRITE] Source URI: '/forums' => Result URI: '/index.php'
2013-01-30 10:36:12.836 [INFO] [10.1.1.156:50369-5#Techie] [REWRITE] Last Rule, stop!
Reply With Quote
  #5  
Old 01-30-2013, 11:15 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
looks like native LSWS vhost setup. are you able to request a simple phpinfo page?
Reply With Quote
  #6  
Old 01-30-2013, 11:29 AM
techieanalyst techieanalyst is offline
New Member
 
Join Date: Dec 2012
Posts: 7
like any php?

You thinking PHP mod rewrite isn't enabled maybe?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:47 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.