Forum Moderators: phranque

Message Too Old, No Replies

Base URL changes

         

NINtender

4:07 am on Sep 10, 2004 (gmt 0)

10+ Year Member



I've set up this .htaccess

RewriteEngine on
RewriteCond %{REQUEST_URI} !-d
RewriteRule (.*)/(.*)\.htm mypage.php?parm1=$1&parm2=$2

so a page like
www.mydomain.com/p1/p2.htm
will translate to www.mydomain.com/mypage.php?parm1=p1&parm2=p2

it works fine, except that the baseurl is altered, so everything thinks the baseurl is www.mydomain.com/p1/
so relative image links fail, as does a recursive repost of the page.

any ideas how I can remedy this annoyance?

Any suggestions would be grand!

NIN

jdMorgan

4:15 am on Sep 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



NINtender,

Welcome to WebmasterWorld!

Have you tried using the RewriteBase [httpd.apache.org] directive?

Jim

NINtender

6:20 am on Sep 10, 2004 (gmt 0)

10+ Year Member



Since I'm a newbie at .htaccess, and I reaped the other code from here in these forums, the answer would be....well....no. But Thank's for the reference and I'll research.

Thanks for the welcome. Hope I can begin to contribute as well.