Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [redirect]

The tag has no usage guidance.

1
vote
1answer
12 views

Can't Get Past Control Panel Login. Keeps Redirecting Back to Login Page

I followed this guide to move my local hosting from WAMP, which has been giving me a bunch of 500 errors since switching to Craft 3, to Local By Flywheel. After getting everything configured, I can ...
-1
votes
0answers
20 views

Unable to redirect http to https in .htaccess craft

I have added a SSL certificate on my website, now I want to redirect my site from http to https. I have tried the following in my .htaccess file but it somehow doesn't work for me. RewriteCond %{...
0
votes
0answers
25 views

How to redirect the page with params?

In the front-end, I create a form and submit the data to backend. In the controller, if got some errors, I would like to redirect to the previous page with some information. I tried like this: return ...
2
votes
2answers
86 views

Does Craft Have a URL Rewrite Vulnerability?

We could use some help tracking down a consistent error on our Craft installs according to Acunetix Security Audits. URL Rewrite Vulnerability It was identified that this application supports the ...
1
vote
1answer
33 views

Forcing a / with .htaccess

After redirecting a website to https environment I had the difficulty that .php/ was added to the url which resulted in double content. I have been able to get past this mistake but now I need to ...
1
vote
1answer
52 views

Force redirect from HTTP to HTTPS via htaccess with multisite installation

I'm using Craft CMS 3 multisite installation with more than 20 website based on subdomains. There are websites: website.com one.website.com two.website.com with identical url paths but different ...
1
vote
1answer
28 views

Using redirectInput {id} parameter

I have a public registration form and want to redirect to a payment page where I will need some details about the newly created user. I tried doing this in my form: <input type="hidden" name="...
0
votes
0answers
13 views

Live-Preview Broken when Redirecting from non-www to www (Craft 2)

I had previously not been redirecting my website from non-www to www with the URL set in my general-product.php as http://examplesite.com. I recently update my .htaccess to reflect the redirection. &...
1
vote
1answer
41 views

Login form redirect not working

My login form is not redirect like I want it to. <form method="post" accept-charset="UTF-8"> {{ csrfInput() }} <input type="hidden" name="action" value="users/login"> <input type="...
3
votes
1answer
86 views

Sprout Form redirect after submit not working correctly

All my forms on sprout form won't use the redirect they get assigned via the Form builder. Whenever a form is succesfully submited it redirects to my homepage instead of my thank-you page. <form ...
0
votes
0answers
27 views

Rewrite rule possibly not fully working in .htaccess

Disclaimer: This is what I would call a 'cross-post' from the serverfault site and NOT a repost. My question did get answered there - at least for what I had asked in that site, though I wanted to ask ...
0
votes
0answers
48 views

Craft Commerce Plugin - How to refresh/reload/redirect page in onStatusChange

I need some help in a craft backend plugin. I use this plugin in a commerce order page. I'm using it to handle onStatusChange (commerce_orderHistories). In this event, i'm testing a custom variable ...
0
votes
3answers
267 views

Best approach for these redirects

Working on a Wordpress migration at the moment, and all the post URLs are http://sitename.com/post-url, and I need to redirect them to their new home at http://sitename.com/article/entry-url. It's ...
0
votes
0answers
200 views

Plugin Development (Craft 3): Pass variables with redirection

I'm building out a Craft 3 plugin and can't see who to pass variables with redirection from a controller. For example, I have a controller that I want to pass back to the defined redirect value ...
0
votes
0answers
33 views

No redirect to 503 from the homepage when system is off

When isSystemOn => false in the general config; and the user is not logged in. Going to the homepage does not redirect users to the 503 template (holding page). All other pages redirect as expected....
2
votes
1answer
398 views

How to show homepage for 404 errors

Instead of a standard 404 error page, I want to send 404s to the homepage and can't seem to get this working right. If I add {% redirect '/' %} in my 404.html template, that works except it gives a ...
1
vote
1answer
135 views

how to set loginPath in config file

I made a modal for login at homepage and put {%requireLogin%} tag in "User Profile" page. My general.php file looks like below: 'dev' => [ // Base site URL 'siteUrl' => null, ...
1
vote
1answer
43 views

How to pass variable to Redirect tag

I have a fruit Link it field that I use to allow users to choose an entry and have that page redirect to the chosen entry. Not sure of the syntax to use to pass that link it field to the redirect ...
1
vote
0answers
87 views

Random redirects to /admin/install

I've had a weird problem come up lately. I'll be working in the admin site of my site, click on a link to an entry or field or whatever, and get redirected to /admin/install and I get a "Page Not ...
1
vote
1answer
31 views

Adding multiple slashes after the site URL breaks the current entry, but still loads the template

I've come across an issue where typing the URL e.g www.sitename.com///about will still load the about template, but not fill the page with the content. Is this an issue for google finding the ...
1
vote
2answers
1k views

Trailing slashes with Nginx and Craft

What's the best way to redirect to a trailing slash in Nginx with Craft CMS? I've seen some advice for Apache .htaccess, etc, but not Nginx. For those curious, here's why I might want to do this: To ...
0
votes
1answer
25 views

how to add a plugin?

I want to add a 301 redirect plugin to a Craft CMS 2.6 website. I only have user permission as well. Please give me steps on how to add my redirects to the back-end of the site?
1
vote
1answer
63 views

How do I redirect from a legacy category URL to a new catgory URL using Retour

I've installed the Retour plugin and have been able to get most of my redirects working, but have now run into a situation where the old site had multi-level category hierarchy eg: /category/category-...
0
votes
0answers
22 views

Occasional NGINX screen instead of home page

We are using the current version of Craft on a small site. We are getting a strange intermittent issue where instead of showing the home page it shows an NGINX page instead. I haven't witnessed this ...
2
votes
1answer
149 views

Craft 3: how can I auto-redirect to a site version using the user IP?

I have set up multi-sites using several locales: — International Website — English — Local Website — French — Dutch — etc. If the user has a French or Dutch IP, it should be auto-...
1
vote
1answer
133 views

Installing Craft in a Sub Folder

I have created a Craft CMS site on a VPS Server running CentOS 7. I have a file setup on the public_html like this: - cms craft public app (this is running a Symfony Framework Web App and runs from ...
1
vote
1answer
210 views

/login page in Craft keeps redirecting to home page. What could be causing that?

I have a structured channel setup to house all the static pages on the site. All of the pages display fine on the page entry template. But the /login page does not. It displays fine in Live Preview. ...
1
vote
2answers
111 views

provide a 'back' or 'cancel' or 'close' button to return to whatever page that particular template was accessed from

I have two templates. For the purpose of this question lets say the first template is step 1, and the second is step 2. There are links to launch these templates all over the site, but some times an ...
2
votes
2answers
476 views

Anyone with a tricked out .htaccess file

I am looking at shaving www. and enforcing https on the entire site without a plugin. All along removing the index.php. Here is my .htaccess file, it works but is it optimized. If you have any ...
2
votes
1answer
1k views

Set cookie and redirect back to referral URL

I'm setting up a site for a brewery that requires age verification. When a user visits the site, I check for the presence of a cookie (I'm using nystudio107's cookie plugin) and if it hasn't been set,...
2
votes
1answer
51 views

Redirect Manager 301 results in “Entry DNE” error

This is my old URL. No entry exists here: /post/234234234234/happy-fourth-of-july This entry exists: /news/happy-fourth-of-july I have the Redirect Manager plugin setup as follows: However when I ...
1
vote
3answers
123 views

Redirect to another EntryType template if no Children exist

I have a Structure Section called 'products' which uses two EntryTypes, one for 'Product Type Overview' and one for 'Individual Products', where 'Individual Products' are the children of 'Product Type ...
1
vote
1answer
358 views

.htaccess for Craft CMS - removing segment from URL

I'm rebuilding a website which needs to run Craft CMS as the main frontend and a bespoke CRM system at the same domain. The file setup is basically public_html cms crm To make things a bit more ...
1
vote
1answer
178 views

Empty page instead of 404 error when url contains channel slug

I have a website where my client can create entries in a couple of different channels. Lets take a "news" channel. The url would be: "example.com/news/nameofpage" Whenever a wrong url is entered ...
1
vote
1answer
207 views

HTTPs Site - Redirects Go to HTTP First & Then HTTPs

So I've updated the site URL in my general.php as follows: 'siteUrl' => "https://" . $_SERVER['HTTP_HOST'], I also have our web server making sure everything goes to https://www.example.com. ...
3
votes
1answer
174 views

Redirect on front end Password Redirect not working

Craft 2.6.2963 I've got a password reset form on the front end which works correctly sending the email. However it doesn't redirect on submit, unless you are loggedin. redirect works if logged in, ...
2
votes
2answers
75 views

Why does {{ user.getPhotoUrl(64) }} point towards storage/runtime and not to storage/userprofiles?

I am trying to load user profile pictures (the Craft ones), but they don't load. The getPhotoUrl() seems to point to the wrong folder(?). The profile images seem to be stored in the userprofiles ...
3
votes
1answer
135 views

Possible to redirect elsewhere after saving an entry?

I'm editing an entry in the CP... mysite.com/admin/entries/mySection/33-my-awesome-entry Now when I save this entry, it will redirect me back to the entry index page. However, I'd like to override ...
2
votes
2answers
562 views

how can pass a variable in redirect?

1.{% set workTitle = craft.request.getLastSegment() %} 2.{% if currentUser %} 3. {{workTitle}} 4.{% else %} 5. {% redirect "/visit/index?artwork=workTitle" %} 6.{% endif %} Each line of code ...
1
vote
0answers
270 views

301 redirects are inserting “index.php” into URLs

I'm in the process of moving a site from one domain to another, so I'm setting up 301 redirects on the old domain. Everything goes well, except when the 301 redirect happens, "index.php" is inserted ...
1
vote
2answers
339 views

Login redirect is not working

I am currently trying to make it so when I have logged in on my website as a user it redirects to a certain page. However it is not working. I have tried adding the following redirect in the ...
2
votes
1answer
480 views

Redirect issue with login and paths

I'm gonna probably find another way around this, but I'm still very new to Craft and want to ask if I'm missing something obvious. This is a commerce site that needs a front-end login. I have an ...
3
votes
1answer
82 views

Charge plugin thanks page 404

I keep getting the 404 after successful payment. I am pretty sure I have everything set up correctly, the thanks template is there, but it seems like Craft won't respond to the request, so the ...
3
votes
2answers
672 views

htaccess non-www rewrite showing index.php in URL

I am using htaccess to rewrite any www url to a non-www version RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] When I type domain.com/...
3
votes
1answer
716 views

Redirecting “if entry is not defined” returns 404 instead

All the documentation, and answers here say this should work... But it returns the 404 instead of redirecting and I can't figure out why? Section: Structure = help Entry URL Format: Top-Level ...
0
votes
1answer
250 views

{% redirect “{{ entry.url }}” %} doesn't work

I've set up a structure channel that has entries at /services/slug however I want the /services template to redirect to the first entry in the services structure. What I have now is: {% for entry ...
1
vote
1answer
79 views

Page redirects permanently to itself [closed]

I am posting this in case anyone will encounter this problem. I also reported a potential bug about that. (see here: https://github.com/craftcms/cms/issues) When you start to suddenly get redirection ...
1
vote
1answer
383 views

Redirect and locale issues when using Valet / Caddy Server

I'm trying to setup our Craft CMS dev environment with Valet which is just a wrapper for Caddy Server and dnsmasq. I seem to be running into some redirect/locale issues that's preventing these pages ...
0
votes
1answer
109 views

Single not loading correctly with additional segments

I've got a single set up to point to /calendar on my site. the single has only one field, SEOmatic so I can add meta title, description etc.. the rest of he page is loaded with content from the ...
0
votes
1answer
83 views

Redirect to url based on current year/month

I've got a calendar template set up and would like to have http://domain.com/calendar redirect to http://domain.com/calendar/current_year/current_month but am having trouble getting this to work. My ...