# Carousel's "Next" & "Previous" links not working

**URL:** <https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543>\
**Category:** General\
**Created:** [November 22, 2019, 8:33pm UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543 "2019-11-22T20:33:56Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![randyrie](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/randyrie/32/2103_2.png) [@randyrie](https://forum.pinegrow.com/u/randyrie)\
**Post date:** [November 22, 2019, 8:33pm UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543/1 "2019-11-22T20:33:56Z")

</div>

I’ve added several new images to my carousel that was working perfectly and still rotates fine but the “Next” and “Previous” links have stopped working. I cannot find what the cause could be - the “Carousel next” and Carousel prev" code blocks look OK and the div tag referencing the carousel1 id is intact. Anyone know where I should look or what to look for to see what I broke? There are over 130 images in this carousel so the next and previous function is important and should be fixed. Here’s the URL to the page: [https://nittanyleathernecks.com/slider\_archived\_test.html](https://nittanyleathernecks.com/slider_archived_test.html) (images won’t display but you can review the code via “View Page Source”).

---

<div class="post-metadata">

**Author:** ![SureWeb](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@SureWeb](https://forum.pinegrow.com/u/SureWeb)\
**Post date:** [November 22, 2019, 9:04pm UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543/2 "2019-11-22T21:04:35Z")

</div>

Hi randyrie,

The JS is referenced twice. Remove one of the instances.

 ![Screenshot_20191122-205655_Chrome](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/8/85da72cc1a2b383be7b82d80528dd780269f0ef5.jpeg)

---

<div class="post-metadata">

**Author:** ![randyrie](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/randyrie/32/2103_2.png) [@randyrie](https://forum.pinegrow.com/u/randyrie)\
**Post date:** [November 22, 2019, 9:46pm UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543/3 "2019-11-22T21:46:56Z")

</div>

@SureWeb  
Thanks for your advice - I removed the second instance of the JS but that did not resolve the issue. Seems the hyperlink area is not working… normally when I scroll over the area shown, my mouse cursor turns into the hand indicating the area is a link. This no longer works so I think whatever code delineates this as an image link is broken. Any ideas how I can repair this?

 ![previous_area](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/5/5e312fed585ad19e083cef73767381d60b859099.jpeg)

---

<div class="post-metadata">

**Author:** ![Printninja](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/printninja/32/1181_2.png) [@Printninja](https://forum.pinegrow.com/u/Printninja)\
**Post date:** [November 24, 2019, 12:28am UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543/4 "2019-11-24T00:28:46Z")

</div>

Link to the site is no longer working

---

<div class="post-metadata">

**Author:** ![randyrie](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/randyrie/32/2103_2.png) [@randyrie](https://forum.pinegrow.com/u/randyrie)\
**Post date:** [November 24, 2019, 10:14pm UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543/5 "2019-11-24T22:14:10Z")

</div>

I gave up trying to figure what the problem was and simply remade the page… so it is working now. Thanks @Printninja for checking though… if anyone, you probably would have found what was causing the issue.

---

<div class="post-metadata">

**Author:** ![Printninja](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/printninja/32/1181_2.png) [@Printninja](https://forum.pinegrow.com/u/Printninja)\
**Post date:** [November 24, 2019, 10:27pm UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543/6 "2019-11-24T22:27:11Z")

</div>

Thanks Randy, I do enjoy doing detective work on websites 😉

---

<div class="post-metadata">

**Author:** ![randyrie](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/randyrie/32/2103_2.png) [@randyrie](https://forum.pinegrow.com/u/randyrie)\
**Post date:** [November 25, 2019, 12:45am UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543/7 "2019-11-25T00:45:44Z")

</div>

Great to hear… I have another issue to solve. Perhaps you can Sherlock this one? This htacess code should redirect from an old site on [http://hlaa-centralpa.biz.tc](http://hlaa-centralpa.biz.tc) to the new site on [https://rjrwebz.com/hlaa](https://rjrwebz.com/hlaa) but doesn’t work. Any ideas what’s wrong with the code?

\*\*  
RewriteEngine On  
RewriteCond %{SERVER\_PORT} 80  
RewriteCond %{HTTP\_HOST} ^(www.)?[rjrwebz.com/hlaa.com](http://rjrwebz.com/hlaa.com)  
RewriteRule ^(.\*)$ [https://rjrwebz.com/hlaa/$1](https://rjrwebz.com/hlaa/%241) [R,L]

\*\*

---

<div class="post-metadata">

**Author:** ![Printninja](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/printninja/32/1181_2.png) [@Printninja](https://forum.pinegrow.com/u/Printninja)\
**Post date:** [November 25, 2019, 2:12am UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543/8 "2019-11-25T02:12:59Z")

</div>

The redirect seems to work fine for me.

---

<div class="post-metadata">

**Author:** ![randyrie](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/randyrie/32/2103_2.png) [@randyrie](https://forum.pinegrow.com/u/randyrie)\
**Post date:** [November 25, 2019, 4:26am UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543/9 "2019-11-25T04:26:35Z")

</div>

Yes the redirect works but only because I’ve added a URL redirect to the index page via a meta tag along with a JS script as insurance. This works but it does flash the old page for split second before the redirect opens the index page on the new site - which won’t happen if I can get the htacess to work and remove the redirect meta tag and the JS. Do you see anything noticeably wrong with the code I’ve written for the htacess file?

---

<div class="post-metadata">

**Author:** ![Thomas](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/thomas/32/61_2.png) [@Thomas](https://forum.pinegrow.com/u/Thomas)\
**Post date:** [November 25, 2019, 8:14am UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543/10 "2019-11-25T08:14:46Z")

</div>

Honestly, I don’t see any significant mistakes - this is just because I’m not really able to read code of that kind. The one I’m used to use does not specify any URL (which might be wrong - but working though):

`RewriteEngine On`  
`RewriteCond %{HTTPS} !=on`  
`RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]`

Might that be of help?

Cheers

Thomas

---

<div class="post-metadata">

**Author:** ![Marf](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/marf/32/1799_2.png) [@Marf](https://forum.pinegrow.com/u/Marf)\
**Post date:** [November 25, 2019, 10:35am UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543/11 "2019-11-25T10:35:44Z")

</div>

> [@Thomas](#):
>
> `RewriteEngine On`  
> `RewriteCond %{HTTPS} !=on`  
> `RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]`

* * *

@Thomas This “Rewrite Rule” is for converting a non secure request (http) into a secured one (http **s** ).  
When the request is already using http **s** , the condition is not valid/match and this rule is going to be ignored and is not in affect!

---

<div class="post-metadata">

**Author:** ![Thomas](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/thomas/32/61_2.png) [@Thomas](https://forum.pinegrow.com/u/Thomas)\
**Post date:** [November 25, 2019, 11:10am UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543/12 "2019-11-25T11:10:53Z")

</div>

Ah - I see @Marf now the big difference and what @randyrie is after. Thanks for this explanation.

Cheers

Thomas

---

<div class="post-metadata">

**Author:** ![Marf](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/marf/32/1799_2.png) [@Marf](https://forum.pinegrow.com/u/Marf)\
**Post date:** [November 25, 2019, 11:17am UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543/13 "2019-11-25T11:17:19Z")

</div>

> [@randyrie](#):
>
> Great to hear… I have another issue to solve. Perhaps you can Sherlock this one? This htacess code should redirect from an old site on [http://hlaa-centralpa.biz.tc](http://hlaa-centralpa.biz.tc) to the new site on [HLAA](https://rjrwebz.com/hlaa) but doesn’t work. Any ideas what’s wrong with the code?

> [@randyrie](#):
>
> RewriteEngine On  
> RewriteCond %{SERVER\_PORT} 80  
> **RewriteCond %{HTTP\_HOST} ^(www.)?[rjrwebz.com/hlaa.com](http://rjrwebz.com/hlaa.com)**  
> RewriteRule ^(.\*)$ [https://rjrwebz.com/hlaa/$1](https://rjrwebz.com/hlaa/%241) [R,L]

Your condition is wrong, the request on the old host is not going to be and contain “[rjrwebz.com/hlaa.com](http://rjrwebz.com/hlaa.com)”.

* * *

Use something like this (not tested).

```
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(.*)hlaa-centralpa.biz.tc
RewriteRule ^(.*)$ https://rjrwebz.com/hlaa/$1 [R,L] 

```

This is matching when the requested host is **hlaa-centralpa.biz.tc** (with any subdomain).

* * *

And it’s always better to specify, the reason for the redirect.

If the redirect is permanent, use **301**.  
`RewriteRule ^(.*)$ https://rjrwebz.com/hlaa/$1 [R=301,L]`

If the redirect is temporary, use **302**.  
`RewriteRule ^(.*)$ https://rjrwebz.com/hlaa/$1 [R=302,L]`

* * *

---

<div class="post-metadata">

**Author:** ![Printninja](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/printninja/32/1181_2.png) [@Printninja](https://forum.pinegrow.com/u/Printninja)\
**Post date:** [November 25, 2019, 7:58pm UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543/14 "2019-11-25T19:58:15Z")

</div>

You’ve all exceeded my knowledge on the subject. I’ve only modified an htaccess file once in my life, and I just followed instructions I was given.

Anytime I need to redirect an old domain to a new one, I do it through the domain registrar’s DNS settings page.

---

<div class="post-metadata">

**Author:** ![randyrie](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/randyrie/32/2103_2.png) [@randyrie](https://forum.pinegrow.com/u/randyrie)\
**Post date:** [November 26, 2019, 2:32am UTC](https://forum.pinegrow.com/t/carousels-next-previous-links-not-working/3543/15 "2019-11-26T02:32:36Z")

</div>

Thank @Marf for your explanation. Last night, I ultimately went with a simple, single  
\*\*Redirect 301 “/” “[https://www.rjrwebz.com/hlaa/](https://www.rjrwebz.com/hlaa/)” \*\*  
line in the htacess file which works perfectly. I do not know or understand what the **[R=301,L]** part means or does so I’ve omitted it.
