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.
You are not logged in.
Pages: 1
Hi,
I want to redirect some of the old pages which are links on various sites from CE4 i.e services.php to the new page in backlight.
I tried putting in redirects in the .htaccess but backlight rewrite rules override them as add extra bits on, unfortunately I don't have the brain power to work it as to what is going on.
Does anyone have some pointers please
Thanks in advance,
Terry
Offline
Here is the .htaccess form my 'galleries' folder and my rewrite rules seem to work correctly:
---------------------------------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine On
# redirects for revised gallery structure
RewriteRule ^smoky-mountains/(.*)$ /galleries/landscapes/smoky-mountains/$1 [R=301,NC,L]
RewriteRule ^seashores-swamps-and-wetlands/(.*)$ /galleries/landscapes/seashores-swamps-and-wetlands/$1 [R=301,NC,L]
RewriteRule ^great-plains-and-mountain-west/(.*)$ /galleries/landscapes/great-plains-and-mountain-west/$1 [R=301,NC,L]
RewriteRule ^far-west/(.*)$ /galleries/landscapes/far-west/$1 [R=301,NC,L]
RewriteRule ^fall-colors/(.*)$ /galleries/landscapes/fall-colors/$1 [R=301,NC,L]
RewriteRule ^desert-southwest/(.*)$ /galleries/landscapes/desert-southwest/$1 [R=301,NC,L]
# end redirects
############################################################################
# Edit this section for servers using FastCGI
# For FastCGI (or seeing the error message 'No input file specified.':
# add # to the start of the next line
RewriteBase /
RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
# For FastCGI (or seeing the error message 'No input file specified.':
# add # to the start of the next line and remove # from the line after)
RewriteRule ^.*$ - [E=BASE:%2]
#RewriteRule ^(.*)$ - [E=BASE:]
############################################################################
RewriteRule ^(.*)$ - [E=QS:mod_rewrite=on]
RewriteRule ^([^\/.]*)-single.php$ %{ENV:BASE}single.php?%{ENV:QS}&id=$1 [QSA,L]
RewriteRule ^([^\/.]*).css$ %{ENV:BASE}index.php?%{ENV:QS}&extension=css&name=$1 [QSA,L]
RewriteRule ^([^\/.]*).js$ %{ENV:BASE}index.php?%{ENV:QS}&extension=js&name=$1 [QSA,L]
RewriteRule ^([^\/.]*).gif$ %{ENV:BASE}index.php?%{ENV:QS}&extension=gif&name=$1 [QSA,L]
RewriteRule ^([^\/.]*).png$ %{ENV:BASE}index.php?%{ENV:QS}&extension=png&name=$1 [QSA,L]
RewriteRule ^([^\/.]*).jpg$ %{ENV:BASE}index.php?%{ENV:QS}&extension=jpg&name=$1 [QSA,L]
#RewriteCond %{QUERY_STRING} !mod_rewrite=on
#RewriteRule ^index.php$ %{ENV:BASE}index.php?%{ENV:QS} [QSA,L]
RewriteCond %{QUERY_STRING} !mod_rewrite=on
RewriteRule ^mobile.php$ %{ENV:BASE}mobile.php?%{ENV:QS} [QSA,L]
RewriteCond %{QUERY_STRING} !mod_rewrite=on
RewriteRule ^(.*)download.php %{ENV:BASE}download.php?%{ENV:QS} [QSA,L]
RewriteRule ^$ %{ENV:BASE}index.php?%{ENV:QS} [QSA,L]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(.*)$ %{ENV:BASE}index.php?%{ENV:QS}&page=$1 [QSA,L]
</IfModule>
############################################################################
# To fix cross-origin font issues for non-Pages users, remove the preceding '#' on the next five lines:
#<IfModule mod_headers.c>
# <FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff)$">
# Header set Access-Control-Allow-Origin "*"
# </FilesMatch>
#</IfModule>
############################################################################
Charlie
www.stalkinglight.com
Offline
Offline
Ah, I didn't read your post clearly. It might be simpler just to move the content from the CE4 pages to Backlight ones, that's what I did. Initially it's more work but simplifies maintenance down the road. Unless you are wanting to keep both CE4 and Backlight sites.
Charlie
www.stalkinglight.com
Offline
In your Backlight menu set can you not just specifiy the URL for your services php file?
Charlie
www.stalkinglight.com
Offline
Following format should work:
Redirect 301 /old-page.html http://www.mydomain.com/new-page.html
Redirect 301 code is a permanent redirect. This means that search engines should update their internal database to always use the new location.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
Yeah that doesn't work either. I'm sure it's because there is other code controlling redirects and they are conflicting.
.htaccess line
Redirect /galleries.php /commercial/
Result in the browser
http://www.terryliveseyphotography.co.uk/commercial/?mod_rewrite=on&page=galleries.php
hmmmm
Offline
Or maybe
RewriteRule /galleries.php /commercial/ [R=301,L]
I would add this as the first rule after 'RewriteEngine On'
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
Just did that with the same result.
The other lines which are in sub directories work fine but looking at Matt and Bens bits in there it looks like they are watching what happens at the root. I'm sure there will be a way to format it but not found it, maybe I need to format the to address differently.
Thanks for your help though
Offline
So I have deduced that anything in the root is redirected (or anything under the control of backlight) so I reverted to uploading a php file the name of the old link with the following code to do a permanent redirect:
<?php
// PHP permanent URL redirection
header("Location: http://www.terryliveseyphotography.co.uk/training/", true, 301);
exit();
?>
Just need to work on redirecting the directories but put this up there for anyone else wanting to do the same.
Offline
Pages: 1