Questions tagged [redirect]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
39 views

Redirect to template from controller and pass data

I am building a custom login process which follow these steps: Request user email (submits to custom controller) Check if user has an account If they have an account, show a form requesting their ...
1
vote
1answer
26 views

.htaccess file not rewriting url

Hi I'm having major problems trying to get my .htaccess file to rewriteRule or redirect one url to another. I've used .htaccess before on other cms installs and always work but for the life of me I ...
0
votes
0answers
13 views

Change ExpressForms redirect URL according to checkbox field

Is it at all possible to set a different Redirect URL on a Express form if a checkbox is checked? To summarise, I have a FreeForm form which contains a checkbox. I would like the submission redirect ...
1
vote
1answer
30 views

Craft login redirecting to /web instead of /templates?

I've moved my Craft directory to the below: Templates Public_Html Web etc.. etc.. My previous directory when I installed was: Public_html > Craft-setup > Web > Templates Now when I login ...
1
vote
1answer
285 views

Redirect after saving an entry

The question was already asked (Possible to redirect elsewhere after saving an entry?) but this was about Craft 2.x. Up until now I used the following code in my plugin (I took it from one of the ...
2
votes
1answer
34 views

Craft 3 Redirect after login based on User field

i'd like to alter the after login redirect URL based on a User custom field, i encountered this but looks like it's not applicable to Craft 3. I could re-write the whole UsersController class on a ...
2
votes
1answer
68 views

Redirect all but certain requests to index

I have a defined in routes.php a regex that redirects all queries but api to my index template: return array( '<url:(?!api).*>' => ['template' => 'index'] ); I'm trying to exclude ...
1
vote
1answer
79 views

Craft 3 redirect of existing and non-existing URLs

I'm upgrading a relatively large, but low budget, local government website from Craft 2 to Craft 3. The major remaining pain point is a replacement for the Craft 2 Reroute plugin, which is not ...
0
votes
0answers
46 views

How to hook into root controller to redirect any route based on some criteria?

We have a use case where if our user account has a certain flag that they are redirected to a specific page. Is there a way to hook into the root controller or some sort of router mechanism such that ...
1
vote
2answers
56 views

Using a Redirect plugin in conjuction with a wildcard route

I have Craft set up to serve a single page Vue App (vue-cli) for all routes it can't match in the sections. return [ '<url:(?!api).*>' => ['template' => 'index'], ]; This works ...
1
vote
1answer
119 views

Change Freeform redirect URL according to checkbox field

Is it at all possible to set a different Redirect URL on a FreeForm form if a checkbox is checked? To summarise, I have a FreeForm form which contains a checkbox. I would like the submission redirect ...
1
vote
1answer
49 views

Need help trying to pass a variable of a related entry

On my page, I have a form which is using Freeform (Solspace). I'm attempting to setup a custom redirect URL for the form. The form will apply to numerous entries in a channel and some will require ...
1
vote
1answer
507 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
68 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
659 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
76 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
283 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
167 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
209 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
237 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
3answers
1k 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
400 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
51 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
806 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
296 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
110 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
169 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
3k 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
38 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
156 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
248 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
330 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
401 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
359 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
821 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
2k 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
83 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
204 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
490 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
260 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
243 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. ...
2
votes
1answer
227 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
89 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 ...
2
votes
1answer
312 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 ...
3
votes
2answers
894 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
472 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
452 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 ...
1
vote
1answer
661 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
90 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 ...