[wp-hackers] Please Help: Gallery2 Rewrites and Wordpress Pages
Otto
otto at ottodestruct.com
Mon Jul 9 15:46:01 GMT 2007
I fail to understand the problem. Could you describe the setup in more
detail? I don't use Gallery and so I don't understand what you're
trying to do here or what its rewrite rules are.
It reads like you have Wordpress installed at the root, then have a
Page called "Photos", but I don't understand where or how you're
calling gallery. What is /photos/images? Is it a real directory? Where
is Gallery installed, what are its rewrite rules?
Any rewrite problem can be solved, you just have to give all the details.
On 7/8/07, ozgreg <wphackers at galleryembedded.com> wrote:
> Part of the technical challenges in combining Gallery2 Output within Wordpress is the clash of the Wordpress Greedy Rewrite Rules and Gallery2.
>
> In the past, we found the most robust way to stop rewrite rules from returning 404's was to direct the output to an external php page which in turn generates a "Wordpress Page"..
>
> Although this approach is very robust it is never desirable to have to add an additional file to the Wordpress Root Directory and it is something we want to avoid.
>
> I have many an attempt to instead build a internal Wordpress Page and added a hook to perform a termplate redirect and although this approach works well within Wordpress as soon as Gallery2 Rewrite Rules are added to the Mix the entire solution goes south with 404 errors ..
>
> For Example
>
> Wordpress Page -> /photos
> Gallery2 URL -> /photos/Images
>
> Gallery 2 rewrite rule
>
> RewriteCond %{THE_REQUEST} /photos/([^?]+)(\?.|\ .)
> RewriteCond %{REQUEST_URI} !/photos$
> RewriteRule . /photos?g2_path=%1 [QSA,L]
>
> URL sent to Wordpress would then be /photos/Images which Wordpress Cannot Find (IS_404)
>
> I believe solution would be to change the internal Wordpress Rewrite Rules
>
> (photos)/page/?([0-9]{1,})/?$
> (photos)(/[0-9]+)?/?$
>
> to be more greedy to redirecting any children Pages of photos to the parent photos but to be honest rewrite structures are not my strength and would love some feedback, suggestion or ideas on how to handle this..
>
> ------------------------
> WPG2 Installation, Operation & FAQ Documentation (http://wpg2.galleryembedded.com/)
>
>
>
>
> -------------------- m2f --------------------
>
> Gallery2 Embedded Forums (http://www.galleryembedded.com/forums/)
> -------------------- m2f --------------------
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list