Comments (7)
The "some reason" can be found in heroku logs
, because Apache will tell you what's wrong with the file!
from heroku-buildpack-php.
I'm using .htaccess and mod_rewrite with success using the buildpack, however it's not working for files suffixed with .php as I detailed in #46
Are you perhaps facing the same issue as me?
from heroku-buildpack-php.
RewriteEngine On
RewriteBase /
### Canonicalize codeigniter URLs
# If your default controller is something other than
# "welcome" you should probably change this
RewriteRule ^(index(/index)?|index(\.php)?)/?$ / [L,R=301]
RewriteRule ^(.*)/index/?$ $1 [L,R=301]
# Removes trailing slashes (prevents SEO duplicate content issues)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]
###
# Removes access to the system folder by users.
# Additionally this will allow you to create a System.php controller,
# previously this would not have been possible.
# 'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
# Checks to see if the user is attempting to access a valid file,
# such as an image or css document, if this isn't true it sends the
# request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
<IfModule !mod_rewrite.c>
# Without mod_rewrite, route 404's to the front controller
ErrorDocument 404 /index.php
this is my .htaccess
from heroku-buildpack-php.
I think i might be. It doesn't redirect to my index.php file, and CI is erroring out.
This is what i have in my app folder.
application composer.json composer.lock index.php Procfile public system vendor x.txt
from heroku-buildpack-php.
Confirmed it's a problem, working on a fix. Thanks for bringing this to our attention!
from heroku-buildpack-php.
Fixed in 14092f9. Caveat: it is currently not possible to rewrite .php
URLs that point to files that actually exist. This is due to how we use rewrites (rather than the much inferior ProxyPassMatch
approach) to hand requests over to mod_proxy_fcgi
. Currently working with upstream on a better (SetHander
based) approach.
from heroku-buildpack-php.
Can't use this .htaccess file for some reason :/ https://github.com/Wruczek/ts-website/blob/1.0/.htaccess
from heroku-buildpack-php.
Related Issues (20)
- PHP 8.2 support HOT 1
- PHP 8.2.2 upgrade HOT 2
- v232 is not published in packagist.org HOT 7
- Composer hash changed so "Installer corrupt"?
- Warning: The "HEROKU_" namespace is protected and shouldn't be used. HOT 1
- Allowing skipping the installation of the webserver that is not used HOT 1
- PHP 8.3 support HOT 2
- Configure the AMQP CA path automatically HOT 1
- ext-newrelic segmentation fault, breaks site HOT 3
- Supporting Excimer
- Add support for FrankenPHP HOT 2
- setting php platform version ignored HOT 1
- PHP-FPM Worker Process Configuration Error, Fractional Worker Count Issue HOT 1
- Add support for ext-parallel HOT 1
- ZTS support
- cgroupsv2 support
- Support ARM64 when using Heroku-24 Docker images HOT 2
- Find a way to get back on main for `heroku_hatchet`
- CI is broken for community contributions HOT 2
- Upgrade New Relic Agent 11.0.0.13 => 11.1.0.14 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heroku-buildpack-php.