I am new to stackoverflow.
I have already installed a WordPress blog(WordPress version 3.9.2) within a CakePHP(CakePHP 1.3) site.
I have followed this link:
http://www.balistupa.com/blog/2010/08/how-to-redirect-appwebrootblog-into-blog-wordpress-cakephp/
Changed both the .htaccess files as mentioned in the link.
Its working perfectly.
But the problem is if I write the url like: www.mydomain.com/blog/ then its working perfectly
But if I write www.mydomain.com/blog, that means without a / at the end, it is still redirecting to www.mydomain.com/app/webroot/blog/.
Can anyone solve this out? Do I need to make any more changes to that .htaccess files?
The tutorial on that link says that if I wont write that / at the end it will be redirected to the proper url without any problem, but still its not working.
Related
My website is setup on a linux server and behind WAF. The files are placed in root folder of apache server. The .htaccess contains rules as specified by wordpress.
The issue is that when I try to access my website as https://www.example.com, it gives ERR_TOO_MANY_REDIRECTS error. But when I try to access the website as https://www.example.com/index.php, it loads and works perfectly fine.
The couple of things I tried to pinpoint the error:
Deleted all files and folders from root folder and created a test index.php file. When I tried to access https://www.example.com, it displayed the contents of this test file
I also tried deleting .htaccess but this didnt help
I am still unable to figure out what the issue is. Can anyone please help out?
disable all your plugins.
in your theme if you using redirect code in your functions or other page , use exit() or die() after your redirect code.
After trying a LOT of suggested solutions online, I fixed the issue by using the plugin Redirection. This plugin solved my issue within minutes!!
Here is the link to the article which helped me.
We created a website on WordPress (do it locally by Denwer - the russian example of XAMPP). It's time to test and to rearrange it to the branch of site. For example, http://site.ru/test/. I.e. when I am handling to this address, our site should open by WordPress, but not old pattern http://site.ru (there are only html/css code). I threw in a folder "test" by the FTP all files of WordPress, made the import of the database, replacing her line, which was listed a local address of the site (for example, primer/ to http: //site.ru/test/. The site is installed. The home page works without bugs, but when you're trying to go to any page of the site WP, an error 404 is occured: "Not Found. The requested URL /index.php was not found on this server." Question: Is it possible in any way to fix this? If so, how? Thank you and sorry for my english
If I'm understanding you properly, you can open your .sql file with Dreamweaver or a similar program, replace your current url with the new url and be on your way. You also have to make sure that your Wordpress URL and Site URL also get changed in the mix as well. These are in the options section of your Wordpress database.
TLDR:
Recently migrated my site to a new host. The header and footer (without CSS) show up, but the pages all show "Page Not Found".
Further Explanation:
I migrated my site (small CakePHP project) to a new host, and did these steps:
And follow this steps:
Migrated every file and folder
Imported the complete database
Changed the database configuration
Checked the folders, everything is set to dirname, and stuff like that, so no problem
Now, when I access the site in the new hosting, it shows page not found, and the CSS are missing. I edited the index.php on app/webroot and added a few echos to see if the flow was ok. If I add an echo, the CSS works (if I add echos in any part of the source, the echo was echo '1';) but still with the "Page Not Found".
What version of CakePHP are you using? If it is 2.x, you need to make sure you have php 5.2.8 or greater.
The other thing to confirm is that mod_rewrite is enabled and working correctly. It sounds like this may be the issue.
Maybe you forgot to copy any of the .htaccess files.
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.
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.