Community @ The Turning Gate

Support community for TTG plugins and products.

You are not logged in.

#1 2019-06-05 23:21:29

Nico3939
Member
From: France
Registered: 2016-10-05
Posts: 175
Website

Transparent Redirect homepage via htaccess (resolved)

Hi,

All is in the question;

I would redirect ( with a transparent redirection) my home page (Index Page) to an album with htaccess

I find this:

RewriteRule ^index.php$ /galleries/stock/index.php [L] 

It redirect my home page to the right page without modify the browser adress (Who stay https://phototheque.nicolaslogerot.com and not https://phototheque.nicolaslogerot.com/ … es/stock/) as I want but this redirect all the other page to an 404 error.

If I try with ^$ who is normally the root but it don't works:

RewriteRule ^$ /galleries/stock/index.php [L] 

Is anyone has an idea please?

Thanks
Nico

Last edited by Nico3939 (2019-06-05 23:43:22)

Offline

#2 2019-06-05 23:36:26

Nico3939
Member
From: France
Registered: 2016-10-05
Posts: 175
Website

Re: Transparent Redirect homepage via htaccess (resolved)

I found a solution that seems to work.

By adding a test so that only the call to the root goes into proxy.
Code:

RewriteCond %{HTTP_HOST} ^phototheque.nicolaslogerot.com$ [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ /galleries/stock/ [L]

Offline

Board footer

Powered by FluxBB