Forum Moderators: bakedjake

Message Too Old, No Replies

htaccess

Need help modifying

         

CanadianChris

6:28 am on Jan 16, 2005 (gmt 0)

10+ Year Member



I want to modify the .htaccess file such that any filename called from it's directory is automatically loaded by another page.

So lets say somebody calls www.domain.com/subfolder/page1

The htaccess file is set to automatically call ../page45.

The browser still still displays www.domain.com/subfolder/page1, but the actual file that's loaded is www.domain.com/page45

I've seen somebody do this before, but I couldn't figure out how they managed to pull it off :( Any help?

coopster

7:11 pm on Jan 16, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Apache mod_rewrite
Options +FollowSymLinks 
RewriteEngine on
RewriteRule page1 ../page45 [L]
The Apache Forum Charter [webmasterworld.com] has some good links to get you started.