Questions tagged [redirect]
The redirect tag has no usage guidance.
1
vote
1answer
61 views
Craft 3 Registration Form Success Redirect
Is it possible to redirect the user to a specific page after they successfully complete the front-end registration form (before activation)? I've tried adding:
<input type="hidden" name="action" ...
1
vote
1answer
22 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 ...
2
votes
2answers
174 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
41 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
110 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
45 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="...
1
vote
1answer
68 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
116 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
32 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
66 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
455 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
274 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
36 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
470 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
166 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
59 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
108 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
2k 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
26 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
78 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-...
2
votes
1answer
184 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
187 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
260 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
134 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
598 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
58 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
139 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
399 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
198 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
218 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
186 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
80 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
181 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
676 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
305 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
375 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
512 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
85 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
744 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
748 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
261 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
86 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
419 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
110 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
86 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 ...
4
votes
1answer
230 views
Redirect entry type to another domain
I have an entry type (outsideCourse) that will never need its own page. It only exists so I can manipulate it in various lists of required courses. Thanks to Mats Mikkel Rummelhoff, I have a macro to ...
1
vote
1answer
446 views
Entry Form: redirect not working
I use a front-end entry form based on the official documentation (https://craftcms.com/docs/templating/entry-form), but after saving the entry, I am running in an error 404 on the entry page.
<...
1
vote
1answer
354 views
Issue with htaccess redirect adding parameters
Having an issue with htaccess redirects adding parameters to the new locations. I have done some research on this and apparently its from the default htaccess rules. I have tried a few suggestions ...