Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2017-11-12 10:36:20

JimR
Member
Registered: 2012-11-30
Posts: 348
Website

htaccess and WordPress page

I have Backlight and the WordPress theme. I've got an about page created in WordPress, that's a sub-page of my photos directory. Here's the structure.

/photos/ <- albums created by Backlight
/photos/album1/
/photos/album2/
/photos/album3/
/photos/album.../
/photos/about-my-photography/ <- page created in WordPress

I have a dummy page in WordPress at /photos/ and it's completely replaced by Backlight. The only reason I have the dummy page is to set it as the parent of the About page.

So in WordPress i have a page About My Photography and its parent is Photos (all within WordPress).

If I include the Backlight /photos/.htaccess file, going to /photos/about-my-photography/ generates a 404 error.

If I delete or rename the htaccess file, the URL works. Actually, everything seems to work without the htaccess file.

I tried deleting several lines in the Backlight htaccess file to see which one(s) are causing the problem, but it seems it's all or nothing. Even when the entire htaccess file is just this, it fails.

<IfModule mod_rewrite.c>
	RewriteEngine On
</IfModule>

So it seems I need to add a rule. I'm not sure how WordPress creates pages for directories and where to locate the source.

What do I need the htaccess file for?
How do I prevent it from blocking access to /photos/about-my-photography/? Or in other words, what rule do I add to /photos/.htaccess to allow for /photos/about-my-photography/ ?


--Jim

Offline

#2 2017-11-12 11:28:08

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: htaccess and WordPress page

Don't double up on locations. For example, if you know Backlight has occupied a URL, don't create a Wordpress page that will have that same URL. Or vice versa.

I can't think of any reason you'd ever want or need to do such a thing anyway. If Backlight is operating in the /photos folder, then don't do anything in that location with Wordpress.

If you really want a link in a specific place in your menu, then add it manually. Or if relying on auto-built menus for an album set, then worst case is you can append the extra menu link using jQuery.

Or, don't create the page with Wordpress; create an album in Backlight to do the job, then just don't publish any images to it. Or use a Theater page with just one big still image. Or whatever. Point is, built the page not as a page, but as an album.


Matt

The Turning Gate, http://theturninggate.net

Offline

Board footer

Powered by FluxBB