i have php project with ci framework. then i install laravel valet. I access my admin page using this domain myprojectname.dev/admin. but the admin page return is 404Page Not found. can somebody help me to fix this ?
If You using codeigniters routing, then You should write like: myprojectname.dev/index.php/admin, if You hav not `.htaccess file in Your root folder
Related
I have installed laravel in my root of domain, its working fine. However
I want use one sub directory for other purpose like install admin panel in it. For example I have installed laravel in example.com Now I want install other core PHP admin panel in new sub directory called adminpanel. its like this example.com/adminpanel/
but when I try to access it, its giving me error called page does not redirect correctly. I have read somewhere that I can achieve it if I modify my .httaccess file but I have not much knowlede of it. Let me know if someone can help me for same.
Thanks!
Better option is creating an subdomain for the admin dashboard. Login into your cPanel and create a sub domain adminpanel.example.com set the path to your new folder.
Non cPanal
If you don't have cPanel, You should create vhosts for your subdomain in server config (apache/nginx).
I have a controller to display some data and my yii install is in a folder named api.
If i navigate to localhost/api/mycontroller I get a 404 error.
But if I put my yii install in my root folder and navigate to localhost/mycontroller it works.
Any tips what am i doing wrong?
Thanks
Try to add index.php on the path and see it works or not.
e.g localhost/index.php/api/mycontroller
If it works, you can hide 'index.php' follow the guide below.
http://www.yiiframework.com/wiki/214/url-hide-index-php/
I'm new in the web development.
I created a username/password page using CodeIgniter.
Now I have to join my work to another website which doesn't use the MVC structure.
I read an article talking about what Codeigniter cannot do here:
https://philsturgeon.uk/codeigniter/2012/12/05/5-things-codeigniter-cannot-do-without-a-rewrite/
and I didn't find anything about join a Codeigniter project to another website.
However, I didn't find any tutorial which explain how can I add a Codeigniter project to a "no-MVC" structure....Or maybe they didn't mentioned it in the article I sent you but it's actually impossible to do it..
So, assuming that it's possible to join a Codeigniter project. I currently have access to my login/password page using this url
http://localhost:8888/CodeIgniter-3.0.0/index.php/login
On my website, I want to create a link which redirect to my login password.
I put on on my CodeIgniter file as follow
root:
-System /
-Application /
-public_HTML /
-> index.php (from CodeIgniter)
-> asset/
-> index.html
Now I want to create a link into my index.html which redirect to the Login page which is store into /Application/controller/Login.php. In localhost I don't have this problem because I need to write in the url:
index.php/class_name/method_name
Given I had no idea about how to redirect to my login page, I tried to create a link by this way (which didn't work as you might guess)
Contact
I don't really have an idea about how to id so please, does anyone can explain me how can I join a CodeIgniter project to another one which doesn't use a MVC structure.
Thanks :)
You may try to take out the public_html folder from the Codeigniter (CI) folder structure, this because CI uses index.php to load your CI application.
(root_folder)/
-> /ci_folder/index.php
-> /ci_folder/application/
-> /ci_folder/system/
-> /public_html/
After that create the link with the URL to /public_html/index.html
it's working now.
I just load the index.php/Login from the index.html :)
I juste didn't understand that CI uses index.php to load CI application !
I started studying CodeIgniter Web Framework and I am trying to work with PHPStorm 8.0.3 on Kubuntu 14.04. When I unzip CodeIgniter downloaded archive to root Apache folder /var/www/html and go to
localhost/index.php
then it works okay and I see "Welcome to CodeIgniter!" page. Also I
can use
localhost/index.php/welcome/index
and see the same page as it should be.
When I created a new PHP project in PHPStorm and try
localhost:63342/codeignitor/index.php/
then I see welcome page, but if I use
localhost:63342/codeignitor/index.php/welcome/index
then I get 404 page. Also all my own controllers are not available and
cause 404.
I can call my own controller only if I make it default
$route['default_controller'] = 'mycontroller';
I think that this problem occurs because the URL contains name of my project /codeignitor/, but I'm not sure about it. So I need your advice how to set CodeIgniter environment in PHPStorm correctly to solve this problem. Thank you!
Codeigniter uses the URL to determine routing, therefore /codeigniter/index.php/welcome/index and /index.php/welcome/index are not equal paths. I would recommend using one or the other, and adjusting your /index.php and /config/routes.php to accommodate for your desired path.
References:
Codeigniter Subfolder
https://www.codeigniter.com/user_guide/general/urls.html
https://www.codeigniter.com/user_guide/general/routing.html
https://www.codeigniter.com/user_guide/general/environments.html
this is my problem with laravel & WordPress:
i need to put a blog inside laravel installation.
i want to use WordPress but i can't figure it out.
i put the WP files inside public/blog/ but i can't install it.
the redirect is the error part.
i need to say that to Apache:
if( $url = public/blog/* ){
ignore normal laravel routing system & redirect to WordPress inside (public/blog/*)
}
To keep your laravel .htaccess clean, just copy the .htaccess from any active wordpress project using clean urls (or look in wordpress doc) and copy it to your clean wordpress folder in public/bloc (it's nearly the same as for the laravel).
Without the .htaccess in your blog folder the laravel "public/.htaccess" redirect all not specific and existing files url to "public/index.php"
to solve this I just put the laravel folder next to the wpBlog folder.
& used namespaces to redirect the user to each based on the used url.
SO:-
blog.website.com : will redirect to the wp blog
site.website.com : will redirect to the laravel website