drhiii
Status: New User - Welcome
Joined: 18 Oct 2007
Posts: 1
Back to top
Posted: Oct 18, 07, 9:56    URL Rewrite, passing variables, or some other way???
Scenario... am running an image based (gallery2) web site with Zencart bolted onto it. It requires that /gallery2 and /zencart hang from the top level domain, for the relationships to work.

E.g. [link] and [link]

It is the way zencart must interact with gallery2 that requires this. My problem is, I need to be able to pass specific URLs to gallery2, to do things like 'lookup' a permalink based on a URL.

[link] which would then jump to an album or image name based on the permalink. This album or image could be nested one level or twenty levels deep. It makes for very elegant lookups. My problem is, I need to use the top level domain to do the search....

[link]

and this needs to be passed to

[link]


I've created several .htaccess files in the root directory to either rewrite, or redirect. If I try to rewrite the URL, I get caught into a loop. As example:

RewriteEngine On
rewritecond %{http_host} ^www,abc.com
rewriteRule ^(.*) [link] [R=301,L]

It just ends up in a loop with [link]

I've tried passing based on a directory:

RewriteEngine On
rewritecond %{http_host} ^.*
rewriteRule ^(.*) /gallery2/main.php/$1/$2


This actually works, but, it does NOT pass the URL in toto to the subdir and gallery2. If I submit [link] I am successfully passed to the subdir, the main page answers, and everything continues as normal. However, if I try

[link]

I am still left off at the main page. It does not pass the /v/MarilynMonroe to gallery2. If I enter

[link]

gallery2 answers and follows through just fine.

What I am trying to do is use the TLD, [link] to redirect to [link] and whatever else I need on that line, but for the life of me I am not able to pass the entire string to the next level.

Pardon the long explanation, but I don't know how else to articulate this...

Help anyone???
Display posts from previous:   

All times are GMT - 8 Hours