Questions tagged [htaccess]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

.htaccess giving me, 'redirected you too many times' error

I have edited my .htaccess to it directs to https but now I am getting this error; 'www.siteexample.com redirected you too many times' I have tried many versions this being the last RewriteEngine ...
user avatar
0 votes
0 answers
24 views

Getting GraphQL working with Authorization header

In the docs, the following is written: Apache strips Authorization headers by default, which can be fixed by enabling CGIPassAuth or adding the following to your .htaccess file: RewriteCond %{HTTP:...
user avatar
  • 433
1 vote
1 answer
50 views

Craft CMS SSL added to website correctly but says insecure for admin panel

I have 2 websites one in craft cms 2 and the other in craft cms 3. Everything works fine except the control panel always shows HTTPS insecure, for both the sites. Below is my .htacces file, <...
user avatar
1 vote
1 answer
168 views

Incorrect canonical URLs and redirect chains

I have installed SEOMatic. However, I am getting incorrect canonical URLs. Here is an example: https://jenoffvanhulle.com/en/ The URL has a trailing slash, the canonical URL not A second problem is ...
user avatar
  • 11
1 vote
1 answer
341 views

500 Internal Server Error when accessing admin

I just get a server error when trying to access /admin, or any other URL. This is a completely new installation on a staging server. The 'Welcome' page shows OK. I'm guessing this is a .htaccess ...
user avatar
  • 700
1 vote
2 answers
42 views

Duplicate content from www and non-www

I am getting duplicate content issues because both www and non-www are being loaded. My htaccess has the standard force https as all my other sites but it isn't working. # START Force https ...
user avatar
1 vote
1 answer
433 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 ...
user avatar
  • 177
0 votes
0 answers
49 views

Craft 3 Multi-site with no “default” site AND where control panel login route remains intact and additional directories not necessary

Maybe one of you can help me out? I've tried setting up a multi-language site with no "default site" as per Craft 3 Multi-site with no "default" site. So far so good, except the control ...
user avatar
1 vote
1 answer
1k views

Refused to display/connect when previewing entry on multi-site setup

I run a multi-site setup with four sites; one on unicorn.com and one on all-your-base.com. The way Craft CMS licensing works, you can run multiple sites on different domains on the same license/...
user avatar
  • 617
1 vote
0 answers
36 views

Override the language-part in URL and add a region (en-fr / fr-fr)

I ran into a problem one year ago, but our we changed the specifications and so it was not neccessary anymore(another question here commented). One year later now, the issue is back, harder as before ...
user avatar
  • 85
1 vote
1 answer
433 views

Combine .htaccess. ( http to https AND www to non www AND remove trailing slash ) extending normal craftcms .htaccess

I can't manage to combine all above options. Tested with several options and examples only the most examples focusses only on on problem. The example of .htaccess below is okay but i cannot manage to ...
user avatar
  • 11
1 vote
1 answer
207 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 ...
user avatar
  • 659
2 votes
2 answers
782 views

Multi-site Live Preview not working in Craft 3

In the multi-site Live Preview in admin panel show error in the console. Failed to load http://www.example.local/test: The value of the 'Access-Control-Allow-Origin' header in the response must not ...
user avatar
1 vote
1 answer
174 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 ...
user avatar
  • 11
1 vote
1 answer
571 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 ...
user avatar
3 votes
1 answer
4k views

No input file specified - [proxy_fcgi:error] Got error 'Unable to open primary script: [PATH]/html/index.php (No such file or directory)\n'

I have a peculiar situation that is only happening on the root domain and NOT subdomains. For example, CraftCMS (2.6.3019) running on Apache with php-fpm works fine on dev.some-domain.tld and test....
user avatar
1 vote
0 answers
30 views

Craft 3: Prevent craft adding script filename to URLS

I'm running Craft 3 with multi-site. Working well so far, but my hosting doesn't allow me to create traditional vhosts with their own directories and shared upper filesystem. As such I have an ...
user avatar
1 vote
1 answer
507 views

How do I force www in URL along with the Patrol plugin to force https

I'm using the Patrol plugin to force https in the domain, but I also need to force www into the URL. When I do that with some htaccess rewrite rules I found online I get an error when I try to load ...
user avatar
1 vote
1 answer
536 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 ...
user avatar
  • 21
1 vote
1 answer
104 views

Simple Craft htaccess Help

I have a Craft site where I need to redirect any traffic to www (including dev.lakesideohio.com). The rule seems to be working but for some reason the url gets changed to using index.php with query ...
user avatar
3 votes
1 answer
807 views

Force language segment in URL on multi-lingual site

I'm setting up a multi-lingual site and want to force the language segments: domain.com/en/ domain.com/fr/ However if you go in the URL bar and remove the en/ or fr/ it loads up the English page ...
user avatar
  • 1,907
0 votes
1 answer
116 views

Adding `www` causing it to have index.php

I am trying to get pretty urls In my general.php file I have 'omitScriptNameInUrls' => true, which works fine and removes the index.php BUT When I try to force a www in the htaccess the ...
user avatar
  • 81
0 votes
2 answers
228 views

entry.url forcing https

{{ entry.url }} is generating a https:// link. I don't have SSL on this site, so the page errors out. Settings > General > Site Url is "http://..." My .htaccess is below (though I've read the ...
user avatar
2 votes
2 answers
2k 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 ...
user avatar
  • 373
1 vote
2 answers
4k views

GZIP seems to compress only HTML, not CSS or JavaScript

I'm not 100% sure this is a Craft specific problem, but I'll try here, as it relates to a Craft installation. After running a number of tests, it seems that my CSS and JavaScript files are not ...
user avatar
  • 839
1 vote
3 answers
2k views

Security Headers in htaccess Don't Work

We have an issue on our server when our Security Headers are not working. We added the following to our htaccess file after installing Craft CMS: - <IfModule mod_headers.c> Header always ...
user avatar
3 votes
2 answers
345 views

Printmaker fails to render images under SSL

I am using the Printmaker plugin to print a pdf. Everything seems to be working well when the site is not being forced to use SSL. I am getting the message "Failed to load PDF document." If I remove ...
user avatar
  • 4,696
1 vote
1 answer
697 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 ...
user avatar
1 vote
1 answer
261 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. ...
user avatar
  • 659
1 vote
1 answer
2k views

Craft CMS login 500 (Internal Server Error)

I transferred a website using Craft CMS and now when I want login to admin the console return me jquery-2.2.1.min.js?d=1493126871:4 POST http://website.com/index.php/admin/actions/users/login 500 (...
user avatar
  • 11
1 vote
0 answers
608 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 ...
user avatar
1 vote
0 answers
541 views

.htaccess trailing slashes and ajax calls

I'm building something with Craft and Vue.js and realized that I could view my page with or without a trailing slash, but when it had a trailing slash, my ajax calls to the Element API endpoint failed,...
user avatar
  • 1,907
2 votes
1 answer
2k views

How to remove index.php?p= permanently?

I discovered search engines found duplicate content on my domain due to URLs being output with index.php?p= and index.php in ADDITION to the clean URLs. For example, I have: domain.com/index.php?p=...
user avatar
1 vote
2 answers
471 views

Why is htaccess file not named ".htaccess" on fresh install?

I run into the same error on each project setup with CraftCMS. So did I this time… again… First of all: Yes, I seem to be a slow learner. And therefore I can't memorize to rename the htaccess file ...
user avatar
  • 292
2 votes
2 answers
1k 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/...
user avatar
  • 419
1 vote
0 answers
329 views

Configuring CraftCMS on Arcustech with Cloudflare flexible SSL returns 521 error

I have installed CraftCMS on an Arcustech VPS and successfully added a domain name. Using the domain without the shared SSL works without any problems (e.g. www.example.com / example.com). However ...
user avatar
0 votes
1 answer
289 views

Misconfiguration error when accessing URL without file name

When accessing www.myurl.com/services, I get this error below the content of my page: The server encountered an internal error or misconfiguration and was unable to complete your request. I don't ...
user avatar
1 vote
1 answer
349 views

Cannot omit index.php from URL

I know this question has come up many times before, although after reading and trying dozens of answers, I am none the wiser. I am currently rebuilding my website with Ubuntu 16.04, PHP7 and apache. ...
user avatar
4 votes
1 answer
739 views

Cannot remove index.php from URLs either

I am having the same issue as here: Another index.php?p= problem I tried to post this as a comment rather than open another post but I don't have enough reputation... I have tried all of the ...
user avatar
1 vote
0 answers
189 views

htpasswd issues with Craft

So I raised a previous thread here. https://craftcms.stackexchange.com/questions/16741/conflict-with-htaccess-htpswd Basically with the site behind a htpasswd (as it is a staging url) after ...
user avatar
  • 1,824
1 vote
1 answer
146 views

'Unknown error' caused by redirect in htaccess

I was getting an 'unknown error' when trying to access the admin. I couldn't see anything in the Craft logs apart from 404 related errors. I replaced the app folder but still no luck, eventually I ...
user avatar
  • 879
1 vote
1 answer
468 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 ...
user avatar
  • 781
3 votes
1 answer
615 views

Site will not load. Asking me to save "login" as a file

What would make a site want me to download the index.php when viewed? I downloaded the database and all files from a staging server where site was fine. When I go to any site URL on local machine it ...
user avatar
1 vote
2 answers
3k views

When redirecting to HTTPS from www, index.php appears in URL

I have a redirect setup for www, it successfully redirects to https:// but it includes /index.php?p= in the URL. I'm not convinced by htaccess file is configured correctly. Here's my htaccess file: ...
user avatar
  • 133
1 vote
2 answers
150 views

Migrate WordPress Site into Craft CMS. How deal with 404's?

I migrate my WordPress site into Craft CMS. So far so good. But the URLs for most of the Blog Entries are complete new. What's the best way to handle that? My site is good linked on Google and there ...
user avatar
1 vote
0 answers
728 views

htaccess and favicons

I see from the Craft's default remove index.php htaccess code here that the following line takes into account favicon.ico files. RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [...
user avatar
  • 1,385
5 votes
1 answer
2k views

Why am I getting ?p=oldpage in a 301 redirect?

Not sure whether this is directly related to Craft but I’ve been using this method for years and it has always worked with other sites. I’m replacing an old site and some pages have moved. I want to ...
user avatar
2 votes
1 answer
1k views

.htaccess max_execution_time

I want to change the max_execution_time in the .htaccess file. I tried it in this way: <IfModule mod_php5.c> php_value max_execution_time 300 </IfModule> but then I got a 500 internal ...
user avatar
1 vote
1 answer
788 views

Remove subdirectories from admin URL with .htaccess

I have Craft public files set up within subdirectories of a primary domain’s web root. public_html/ # default web root public_html/example.com/public_html/ # Craft public files here The following ....
user avatar
1 vote
2 answers
417 views

Re-using path segments for an additional domain?

I have a Craft installation with two domains pointing at it. The first domain is all working and has a number of sections including a blog located at /blog. What I want to be able to do is have a ...
user avatar