Laravel pagination broke on GoDaddy Production server - laravel

I have just uploaded my laravel application to my godaddy server and everything works apart from my 'search' functionality and 'pagination' which I presume are related to the same problem, being the URI. I thought maybe it is a .htaccess problem but if so I am unaware of how I can rectify this?
I tried deleting the config cache and it did not solve it.
.htaccess in public_html
<IfModule mod_rewrite.c>
RewriteEngine On
# Removes index.php from ExpressionEngine URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
</IfModule>
.htaccess in laravel root
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
I am using 'variable->links()' to output the pagination links with 'paginate(11).
I hope somebody can be of any assistance which would be highly appreciated.

I adapted my research skills and managed to find a fix using the .htaccess found
https://stackoverflow.com/questions/22403519/laravel-4-pagination-not-working-links-are-ok-but-shows-all-results-in-each-page here.

Related

When i use index.php/User/login its working, But when i use User.login its not working even after removing of index.php in codeigniter

When i use
index.php/User/login its working, But when i use User/login its not working even after removing of index.php in codeigniter, can anyone say what is wrong with my code? its on live server of root directory
my htaccess file is
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
# Hide the application and system directories by redirecting the request to index.php
RewriteRule ^(application|system|\.svn) index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>
Please try below code
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
I've been using this code for many years. I think it could work for you.

How to properly configure the .htaccess of Typo3 to run realurl

I'm a newcomer to typo3 and my current task is to get realurl working. After studying many tutorials and the official documentation I got realurl to the point that the links are converted correctly as expected.
The problem I don't get solved even after testing multiple solutions is the wrong behaviour of the apache server (configured via .htaccess, mod_rewrite). It correctly ignores the rewrites to uploads/ fileadmin / typo3conf but never rewrites the url to index.php when it comes to typo-pages.
Here is the corresponding .htaccess entry:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^typo3$ - [L]
RewriteRule ^typo3/.*$ - [L]
RewriteRule ^uploads/.*$ - [L]
RewriteRule ^fileadmin/.*$ - [L]
RewriteRule ^typo3conf/.*$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*[^/])$ http://%{HTTP_HOST}/$1/ [L,R]
RewriteCond %{REQUEST_FILENAME}/index.html -f
RewriteRule / %{REQUEST_URI}/index.html [L]
RewriteCond %{REQUEST_FILENAME}/index.htm -f
RewriteRule / %{REQUEST_URI}/index.htm [L]
RewriteCond %{REQUEST_FILENAME}/index.php -f
RewriteRule / %{REQUEST_URI}/index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule * /index.php
</IfModule>
Does anybody have an idea whats wrong with this configuration? I'm some kind of desperate :(
Thanks in advance,
Thomas
Best solved with a rewrite log: https://wiki.apache.org/httpd/RewriteLog

Codeigniter A3M Admin Controller

Hi I am trying to use CodeIgniter A3M.
I am trying to view the manage users and manage permission etc but keeps on saying error 404 I am the admin I have just created an account for my self.
This seems to be a problem with your CodeIgniter setup. All the links in A3M are already assumes that you have taken steps to remove the index.php from the path using .htaccess. You can read in the user guide on how to do that. In general you should have this in your .htaccess file in the root:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
Also check that you have all other settings set correctly according to A3M.
I think you must code .htacess file like this
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
Its working for me
My code .htacess
DirectoryIndex index.php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteCond $1!^(index\.php|resource|system|user_guide|bootstrap|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ index.php?/$1 [L]

Codeigniter No input file specified

I know that this question has been asked maybe thousands of time before, I looked at most of them and could not fix for my case :s
I have a codeigniter framework installed on godaddy hosting company and i read that i have to create a .htacces file and put this code into:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>
But this does not fix for my case, is it that I have this site hosted under another domain?
for ex the structure of my ftp looks like below:
/
facelajm
studenti
fxclod
and I am trying to get the site following url www.facelajm.com/studenti which opens the main page fine, but when i try to login or reg it just returns me No input file specified.
Anyone could help me?
Seems that in certain configurations the CI core misses the rules, the .htaccess I'm using now:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?/$1 [L]
ErrorDocument 404 index.php
In my case (dev: a subfolder, prod: an "addon domain") the magic was provided by those two extra lines:
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
Source:
http://www.diegodicamillo.com.ar/blog/2012/09/19/no-input-file-specified-codeigniter-error-problema-resuelto/
From your question what i understand is you are running the codeignitor in a subfolder("studenti") of the domain("www.facelajm.com"). So the below .htaccess code will work.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>
And also don't forgot to change the baseurl in configuration file(application/config/config.php) like below.
$config['base_url'] = "http://www.facelajm.com/studenti"
The above .htaccess which you used in your question will work for a sub domain.
So you can also create a sub domain and map the folder to the sub domain and use the code which you used in your question(For Reference i added below).
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>
And also don't forgot to change the baseurl in configuration file(application/config/config.php) to the new subdomain(assuming new sub domain as http://codeignitor.facelajm.com/) like below.
$config['base_url'] = "http://codeignitor.facelajm.com/"
Here is the .htaccess file i have on a godaddy and it works fine:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
Your problem might be the RewriteBase line if codeigniter is not in the root.
Please try this code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.)$ /index.php [L] or RewriteRule ^(.)$ index.php?/$1 [QSA,L]

htaccess file for codeigniter on subdomain virtualhost

i have problem about .htaccess file for my codeigniter installation.
On localhost this work fine, when i upload online its rewrite URL but the website not work.
this is my htaccess on localhost:
RewriteEngine On
RewriteBase /jCore_01/
#RewriteBase /
### Canonicalize codeigniter URLs
# If your default controller is something other than
# "welcome" you should probably change this
RewriteRule ^(welcome(/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]
# Enforce NO www
#RewriteCond %{HTTP_HOST} ^www [NC]
#RewriteRule ^(.*)$ http://domain.tld/$1 [L,R=301]
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
online i have a problem:
i put this file on subdomain jcore.miodomio.com and it rewrite URL but not work
example:
without htaccess it's work:
jcore.miodominio.com/index.php/en/home
with htaccess
jcore.miodominio.com/en/home
Not Found
The requested URL /en/home was not found on this server.
can anyone help me? suggestion?
regards
Denny
Try change your htaccess to:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
Somethings to consider.
Did you enable Apache rewrite module?
If enabled check whether your virtual host file is configured properly So to make sure its hitting .htaccess or try putting some dump on .htacess , So if its hitting .htaccess than you should get an 500 server error.
If you are not getting error than its mostly the problem in your host settings.

Resources