•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Linux Servers and Apache section within the Tech Talk category of DaniWeb, a massive community of 456,552 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,459 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Linux Servers and Apache advertiser: Programming Forums
Views: 2306 | Replies: 0
![]() |
•
•
Join Date: Oct 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
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. www.abc.com/gallery2 and www.abc.com/zencart
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.
www.abc.com/v/permalinkname 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....
www.abc.com/v/MarlynMonroe1
and this needs to be passed to
www.abc.com/gallery2/v/MarlynMonroe
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 ^(.*) http://www.abc.com/gallery2/$1 [R=301,L]
It just ends up in a loop with http://www.abc.com/gallery2/gallery2...lery2/gallery2
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 www.abc.com I am successfully passed to the subdir, the main page answers, and everything continues as normal. However, if I try
www.abc.com/v/MarlynMonroe
I am still left off at the main page. It does not pass the /v/MarilynMonroe to gallery2. If I enter
www.abc.com/gallery2/v/MarlynMonroe
gallery2 answers and follows through just fine.
What I am trying to do is use the TLD, www.abc.com to redirect to www.abc.com/gallery2 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???
E.g. www.abc.com/gallery2 and www.abc.com/zencart
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.
www.abc.com/v/permalinkname 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....
www.abc.com/v/MarlynMonroe1
and this needs to be passed to
www.abc.com/gallery2/v/MarlynMonroe
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 ^(.*) http://www.abc.com/gallery2/$1 [R=301,L]
It just ends up in a loop with http://www.abc.com/gallery2/gallery2...lery2/gallery2
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 www.abc.com I am successfully passed to the subdir, the main page answers, and everything continues as normal. However, if I try
www.abc.com/v/MarlynMonroe
I am still left off at the main page. It does not pass the /v/MarilynMonroe to gallery2. If I enter
www.abc.com/gallery2/v/MarlynMonroe
gallery2 answers and follows through just fine.
What I am trying to do is use the TLD, www.abc.com to redirect to www.abc.com/gallery2 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???
![]() |
•
•
•
•
•
•
•
•
DaniWeb Linux Servers and Apache Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
apple bbc browser cellphone choose computer core debian dell desktop development enterprise fedora fiji france games gentoo gpl hardware ibm install internet kernel laptop linux microsoft mobile news novell open open source openoffice operating operating system os preinstall ps3 red hat rhel security server source spoof sun system ubuntu unix vista web windows
- Problem passing variables to thread (Perl)
- passing session (PHP)
- multiple variables in a mod_rewrite URL string (Linux Servers and Apache)
- Passing variables from delphi to html forms (Pascal and Delphi)
- function passing variables (C)
- passing variables threw query (MySQL)
- SMF url rewrite (Existing Scripts)
- URL Rewrite in PHP (PHP)
- Passing Variables/Parameters - By Ref/Value? (Computer Science and Software Design)
- Passing variables into form fields (PHP)
Other Threads in the Linux Servers and Apache Forum
- Previous Thread: ubuntu and apache help
- Next Thread: Compiling with minimum modules


Linear Mode