2
   

yet another mod_rewrite issue

 
 
glen
 
Reply Mon 19 Jul, 2004 03:04 am
Hey Kraven,
I have waded through all 22 pages of support on this forum, and still can't figure out what's wrong with my mod_rewrite. I installed and tried to check the mod_rewrite by logging out and deleting cookies. The mouseover for the forum read like it was being rewritten, ie:

mysite.com/boards/forums/phpBB2/forum-1.html

But once clicked I got an error 404. I know for a fact the server has mod_rewrite enabled, I use it on my postnuke part of the site. I have not modified the .htaccess file at all, and it resides in the forum root folder. Any ideas?
Great mod, thanks for your time
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 2 • Views: 2,181 • Replies: 15
No top replies

 
glen
 
  1  
Reply Mon 19 Jul, 2004 03:06 am
sorry sorry
sorry, I noticed I just did two things wrong on that last post.
1. I meant to reply to that topic, not make a new one
2. Your name is spelled with a C, so I am sorry about butchering the spelling of your name!!! THanks again!
0 Replies
 
Craven de Kere
 
  1  
Reply Mon 19 Jul, 2004 03:44 am
Did you get the code from this website?
0 Replies
 
glen
 
  1  
Reply Mon 19 Jul, 2004 09:34 am
nope
actually, I got it from phpbbhacks. I just downloaded your version, and am going to install. Hope it works.
0 Replies
 
glen
 
  1  
Reply Mon 19 Jul, 2004 09:45 am
the same
yeah, it's the same code.... I checked it out. I even uploaded your .htaccess info just to make sure on that part of the code. Any ideas?
0 Replies
 
syntrix
 
  1  
Reply Mon 13 Sep, 2004 11:12 am
I get the same problem with 2.0.7.

Tried over two days, and the issues I'm having are the same as above. Log out, link into a forum, and get a 404.

I am running mod_rewrite from a virtual conf file, and do some other rewrites in a custom compiled apache. I commented out all other rewrites, and still get the 404 error.

Here's a sample error from my log files, and just so happened that google hit it at the same time:

Code:172.16.225.55 - - [13/Sep/2004:10:01:18 -0700] "GET /forum-8.html HTTP/1.1" 404 10132 "http://www.myforum_dot_com/index.php" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
64.68.83.228 - - [13/Sep/2004:10:01:19 -0700] "GET /forum-8.html HTTP/1.1" 404 10133 "-" "Mediapartners-Google/2.1"
64.68.83.228 - - [13/Sep/2004:10:01:20 -0700] "GET /forum-8.html HTTP/1.1" 404 10133 "-" "Mediapartners-Google/2.1"
172.16.225.55 - - [13/Sep/2004:10:01:21 -0700] "GET /forum-2.html HTTP/1.1" 404 10132 "http://www.myforum_dot_com/index.php" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
0 Replies
 
syntrix
 
  1  
Reply Mon 13 Sep, 2004 11:25 am
Wait, this mod assumes that you have a /forums directory, right?

I have phpbb in the root directory mixed with html files. index.php is not my directoryindex page.

Can we just remove the first rewrite rule?
0 Replies
 
glen
 
  1  
Reply Mon 13 Sep, 2004 12:05 pm
got it
Ok, I think i figured it out. If you are getting a 404 page, try adding this to the top of your .htaccess page:

Code:RewriteEngine On
Options +FollowSymlinks
rewriteBase /


Hope this helps!
0 Replies
 
syntrix
 
  1  
Reply Mon 13 Sep, 2004 12:16 pm
rewriteBase provides an error, either in the rewriteengine on or outside of the block.

I did add the +FollowSymlinks, as my phpbb is in a soft link. Everything was working fine before though.

Still the same error message.

Here's what's in my exisiting rewrite:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.website\.com [NC]
RewriteCond %{HTTP_HOST} !^$ [NC]
RewriteRule .*\.(html|htm|pl|php|jsp)$ http://www.website.com%{REQUEST_URI} [R=301,L]

Even with that out, no dice. Oh, and code was downloaded from here!!!!
0 Replies
 
Craven de Kere
 
  1  
Reply Mon 13 Sep, 2004 09:23 pm
syntrix wrote:
Wait, this mod assumes that you have a /forums directory, right?

I have phpbb in the root directory mixed with html files. index.php is not my directoryindex page.

Can we just remove the first rewrite rule?


The first rule (if you mean the forums.html one) is not engaged by the php end of the rewriting, so it's irrelevant (I left it in just for testing).

Please post your rewrite rules.
0 Replies
 
syntrix
 
  1  
Reply Tue 14 Sep, 2004 11:25 am
syntrix wrote:

Here's what's in my exisiting rewrite:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.website\.com [NC]
RewriteCond %{HTTP_HOST} !^$ [NC]
RewriteRule .*\.(html|htm|pl|php|jsp)$ http://www.website.com%{REQUEST_URI} [R=301,L]


As above. I added the copy and paste block above, too. Tested with no other rewrites, and combining rewrites. Also with:

ipconfig /flushdns
and clear cache, close and relaunch browser(s), ie and mozilla.

Here's my apache build:

Code:./configure --prefix=/usr/local/apache --enable-module=most --activate-module=src/modules/php4/libphp4.a --add-module=src/modules/mod_bandwidth.c --enable-module=so --enable-module=ssl


apache 1.3.31, php 4.3.7
0 Replies
 
Craven de Kere
 
  1  
Reply Tue 14 Sep, 2004 10:37 pm
Have you tried the rules in an .htaccess file in the forum directory, as the mod says to?
0 Replies
 
syntrix
 
  1  
Reply Wed 15 Sep, 2004 10:27 am
Craven de Kere wrote:
Have you tried the rules in an .htaccess file in the forum directory, as the mod says to?


No, .htaccess is just an extension for the same entries in a proper httpd.conf file.

I can try it, but the net result would (in theory) be exactly the same.

I don't have much time this week, but maybe on the weekend I can go through everything line by line and test further.

I do have the attachment mod installed in phpbb, and have modified some embedded html for ad tags.
0 Replies
 
Craven de Kere
 
  1  
Reply Thu 16 Sep, 2004 02:05 am
syntrix wrote:
Craven de Kere wrote:
Have you tried the rules in an .htaccess file in the forum directory, as the mod says to?


No, .htaccess is just an extension for the same entries in a proper httpd.conf file.


.htaccess file locations lend relative path logic that can't always be duplicated by using the exact same rules in httpd.conf, sometimes the rules need to be altered.
0 Replies
 
syntrix
 
  1  
Reply Thu 16 Sep, 2004 08:55 am
Craven de Kere wrote:
syntrix wrote:
Craven de Kere wrote:
Have you tried the rules in an .htaccess file in the forum directory, as the mod says to?


No, .htaccess is just an extension for the same entries in a proper httpd.conf file.


.htaccess file locations lend relative path logic that can't always be duplicated by using the exact same rules in httpd.conf, sometimes the rules need to be altered.


I'm not going to argue the difference between htaccess and httpd.conf.

The rewrite rules WORK. The error is a 404 page.
0 Replies
 
Craven de Kere
 
  1  
Reply Thu 16 Sep, 2004 09:04 am
syntrix,

The 404 error is indicative of the specific rules not working and attempting to rewrite to a file that is non-existent (at the location it's attempting to rewrite to), but in any case I'll let you figure it out.
0 Replies
 
 

Related Topics

In How much time a website can be developed? - Question by aussiejumpingcastle
Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » yet another mod_rewrite issue
Copyright © 2021 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 07/28/2021 at 09:05:46