Welcome to WebmasterWorld Guest from 54.226.25.231

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Need assistance with htaccess

Playnig the shell game with file names

     

MLimburg

4:57 am on Sep 12, 2003 (gmt 0)

10+ Year Member



Howdy,

I was hoping I can get some help on the following issue. I'm using a heavily modified version of phpBB2 to run an entire site, and am using an additional file (portal.php) to act as the true frontpage for the site.

Problem is, many people already use index.php for the frontpage, and this is causing some problems. My vision was to use mod_rewrite to alter these on the fly. Basically, to use two references as following:

RewriteEngine On
RewriteRule ^viewcat.php(.*) /index.php$1
RewriteRule ^index.php(.*) /portal.php$1

The idea is that all references to index.php actually push to the portal.php file, and all references to viewcat.php actually push to the (real) index.php ...

Is this feasible/possible?

ScottM

1:03 am on Sep 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Boy, you got me here scratching my head.

I run the same software (phpBB2) for several websites and still can't help you.

Are you sure you have ReWrite working?

ooops-forgot my manners:

Welcome to WebmasterWorld!

claus

2:46 am on Sep 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld MLimburg :)

I think you should change the order of the two statements, so that the index match comes first and the viewcat second. Otherwise there's a chance that you would get this:

viewcat.php to index.php to portal.php

- and that is not what you want.
/claus

jdMorgan

4:00 am on Sep 14, 2003 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



... And use the [L] flag!

Jim

 

Featured Threads

Hot Threads This Week

Hot Threads This Month