Unable to set up pagelime with a codeigniter site - php

I'm trying to setup pagelime to work with a codeigniter site of mine and it looks like I have everything setup because I can view and edit the site in pagelime, but when I publish the page that i've edited, it says successfuly, but if I go to the webpage, it doesn't contain any of the changes that i just made.
I'm guessing it might have to do with the way that codeigniter url's work because when setting up the site, it asks for the url+index page. I tried setting my index page to http://example.com/index.php/controller/index but pagelime always adds index.php to your url so it looks like this - http://example.com/index.php/controller/index/index.php.
Has anyone setup a codeigniter site on pagelime successfully and can help me with this issue?

I have and the way that pagelime works it will not work with a CI framework since as you have found out, pagelime is setup for standard websites. ie: all pages are in the root and subpages follow the link structure so a link to homepage.com/pictures/album1 should be in the root of the ftp then in the pictures folder and to the album1 whereas we know that the pictures "folder" is nothing more than a controller. I hope that I explained that right or that you can decode what i was trying to say there.

First, make sure to add extensions to your routes in the .htaccess file:
Codeigniter Routes for filename with extension
In Pagelime, you can set each page to have an FTP Publish Target in the page properties screen. Set the target to the URL of your view, and you should be good to go.
Hope that helps!

Related

How to find Wordpress Login page. /wp-admin | /wp-login etc does not work

Good day, hope you are well.
I have taken over a project for a client that had another developer do custom work. I have been tasked to just make a few design changes.
My problem is not being able to access the login page to the dashboard.
I have tried using:
http://domainname.com/wp-admin
http://domainname.com/wp-login
http://domainname.com/wp-admin.php
http://domainname.com/wp-login.php
http://domainname.com/admin
http://domainname.com/login
And none of them work.
I have also checked the wp-admin.php and wp-login.php files with no success.
For this reason I am unable to access the dashboard.
It is probably because some security plugin is involved. Can you access the site via FTP? If so, navigate to the /wp-content/plugins/ and disable security plugin by moving out the plugin folder. Make backup of the plugin folder before!
Otherwise, try to add index.php after the domain name in case there are redirect problems on your server or if the domain name is not correctly configured.
As :
http://domainname.com/index.php/wp-admin

What causes a wordpress homepage to load

UPDATE: Real links below to illustrate my issue.
Stick with me on this, because it is a valid question.
In the old days I could have danhoover.org which was a wordpress site and I could have danhoover.org/new which was another wordpress site and both would load fine. I could even point danhoover.net to the danhoover/new directory and the page would load just fine no matter how you got there. You could use danhoover.org/new or danhoover.net and it would load fine. All the permalinks would work. No problem.
Now, however, there is some sort of voodo going on. If a wordpress site is in the danhoover.org/new folder and configured to be "danhoover.net", navigating to the folder as danhoover.org/new will just get you a 404 error.
In addition, going to danhoover.org/new/index.php will get you a 404 error.
There is some sort of voodoo going on that makes you use the url defined in the configuration for the site to work properly. What is it? Is there any way to manually update the permalink structure so it loads properly with either domain?
I guess I'm just confused as to what in the world wordpress is doing that is different than any other php site that prevents it from loading.
UPDATED LINKS:
I have a folder /a which has campscoreboard.net pointed to it.
I have a folder /a/c which has www.c.campscoreboard.net pointed to it.
Wordpress links:
You can go to www.campscoreboard.net/c and the homepage loads
You can go to www.c.campscoreboard.net and the homepage loads and all
the links work.
But if you go to www.campscoreboard.net/c and click on a link like the
Hello World article, you're redirected back to the root for some
reason.
Vanilla PHP Links
You can go to www.campscoreboard.net/c/test.php and it loads fine.
You can go to www.c.campscoreboard.net/test.php and it loads fine.
Only the wordpress urls are redirecting back to the root when loaded via www.campscoreboard.net/c
I've not tried to install WordPress inside WordPress before, but ...
In the wp-config.php file of the relevant WordPress installation, you can set the correct URL and HOME directory manually using:
define( 'WP_HOME', 'http://danhoover.org/new/' );
define( 'WP_SITEURL', 'http://danhoover.org/new/' );
I usually add these after define('WP_DEBUG', false);
Hopefully this helps.
This shouldn't be related to the home configuration as all that would do is forward you to danhoover.org, not give you a 404.
This is likely a server permissions issue where your server is blocking access to the folders. This can be set either on the servers main config file (e.g. httpd.conf) or in a .htaccess file which can be placed in any folder to which one wishes to change its (/subfolders') permissions.
You can read some more here.
A quick way to help you diagnose this, create a static html file and place it in danhoover.org/new call it index.html and place some text in the file then load danhoover.org/new in your browser and see if the text you've written in the file appears, if not then you know it's a server/permissions issue, not a Wordpress one.

Magento Sub Pages Shows 404 NOT FOUND Error

I am using Magento 1.9.1. I installed Magento successfully in my server. But when I navigate any subpages (example:About Us, Contact Us, Login etc) in front end it shows 404 Not Found Error. But Home page display correctly.
My home page url is something like this: http://mydomain.in/store .This display ok. My Contact Us page is : http://mydomain.in/store/contacts . This shows Not Found Error. But when I type url manually like this http://mydomain.in/store/index.php/contacts .This shows working. That is when adding index.php it became working.
How can I make this working??
Solutions I found: Change 'Use Web Server Rewrites' to NO in System->Configuration->Web->Search Engine Optimization.
This make working, but the url contain index.php like this http://mydomain.in/store/index.php/contacts. I think http://mydomain.in/store/contacts is standard and this should work(but I don't know how). Another issue is User Logging, checkout etc are not working here. To make working we can add form key in corresponding pages. But this is not preferable because many pages have to change.
Another solution is: make enable apache mod rewrite. Uncomment this line LoadModule 'rewrite_module modules/mod_rewrite.so' inside 'wamp\bin\apache\apache2.4.9\conf\httpd.conf'.
My question is How to avoid 404 NOT FOUND ERROR in Magento Subpages?
When I follow the above solutions the url path contain index.php. And the logging like features become not working.
How can I avoid index.php in url?
My folder structure is D:\wamp\apache2\htdocs\site\store. store folder contain magento files.
The home page is available in http://mydomain.in/store.
Please help me .Any help is really appreciable..
In order to avoid index.php in urls you must have mod_rewrite enabled on your server and from the Magento admin panel go to System->conguration->web->Search Engines Optimization and set the flag Use Web Server Rewrites to Yes. Clear the cache and give it a go.

Codeigniter subdomain issue

Okey guys i have my project deployed to a subdomain folder on my server and when I try to access that subdomain -> new.mysite.com code igniter loads the 404 not found page.
It works perfectly on localhost and on a server without subdomain for example mysite.com.
Any ideas? I tried to change the base_url to new.mysite.com and it doesnt work.
Is there a way to see what url it is realy trying to load I don't know. I'm desperate i guess i have to touch the routes but what to write there?
This probably hasn't got to do with your base_url setting. If your index page doesn't get loaded, something else is probably wrong.
Are you getting CodeIgniter's 404 message, or Apache's?
In case you're getting CodeIgniter's 404 message (even for your default index page), chances are CodeIgniter isn't able to parse the relevant URL section correctly. In that case: please check (or provide us with) your .htaccess file (in case you're using mod_rewrite).
On a personal note: I've experienced such problem before too. After much fiddling and cursing, I eventually decided to just dive into CodeIgniter's system files (I believe it was system/core/CodeIgniter.php) and to alter the piece of code that reads the relevant piece of the url.

Help with Clean URLs

I am very new to php (in fact about 2 days old). After getting ripped off by my last webhost I have decided to move my website to a different host. A friend has been helping me do this as he has a little info but we are now stuck and I have tried finding a soloution on google but most answers are way over my head. My site is a php site with a mysql database. We have moved the database and ftp'd the site and everything is now working on the new server except one thing - my site was designed originally to use clean urls? When I go to my shop page (ie: mywebsite.com and click on the shop link - mywebsite.com/shop/ (shows in the bottom left of my browser) I get a page not found error, yet when I type in the url mywebsite.com/shop.php the page displays fine. In addition, if I go to mywebsite.com/shop/shoes/ (another link which shows the preceding link in the bottom left hand corner) I get a page not found error. Also if I type in mywebsite.com/shop/shoes.php in the address bar I also get a page not found error even though the page shoes.php exists on the ftp server in a folder called templates - if I go to mywebsite.com/templates/shoes.php it shows up) I understand this is called clean urls and I need to add an .htaccess file to sort out the issue. I have looked on the ftp area of my old host and cannot find this file but have been told it is probably hidden. I have been told by my new provider that mod-rewrite is available on the server but I have no idea how to write this htaccess file. Can anyone please give me a step by step on how to do this as I am not a coder.
Additional Details
I have the following files in my root directory: index.php, shop.php, checkout.php, completed.php, contact.php ... I then have a folder called templates and in this folder I have: shoes.php. clothes.php, coats.php ...
The issue I am having is that most of the php files in my root directory already have href-links? pointing to places like mysite.com/shop/ and mysite.com/shop/shoes/ so when I open up the home page in my browser and hover over the links these are the addresses I see and when I click on the links I get page not found as the borwser must be looking for the links in the wrong place. (these links worked fine however on the last host I used). I understand I need an htaccess file to re-direct these links to the correct places. - ie the link for mysite.com/shop/shoes/ is actually linking to a page called shoes.php located in root/templates. I understand this method was used to tidy up the urls?? ie: instead of having mysite.com/templates/shoes.php the urls shows mysite.com/shop/shoes/. I have looked at the code within some of the php pages in the root and they all have lots of links to these 'false' addresses - ie: mysite.com/shop/shoes/ when the actual file should be at mysite.com/templates/shoes.php. I don't want to go through each file one at a time as they are hundreds of links, thus the reason for trying to make this htaccess file. Thanks for your time, Dave
Try to find an option on your FTP client software to show hidden files.
The name of this file is .htaccess (dot htaccess), that is probably the reason you're not seeing it. If the old site is working then the file is probably there. You could also contact somebody to send you the file via e-mail, IM, etc.
You do not need mod_rewrite or .htaccess for this.
Turn on multiviews in your Apache configuration. This will allow you to omit the .php extension from your URLs.

Categories