Why do my cakephp url's have 'index.php' after the domain? - .htaccess

I've created nice re-directs like this:
https://www.lessonshark.com/sign-up
Currently my url's look like this:
https://www.lessonshark.com/index.php/sign-up
I am aware that this may be an issue outside of Cakephp, but have no clue where to start with this.
As a small hint, the application has been moved from a Linode Virtual server to an IntoVPS virtual server. On the old Linode server, the routing worked perfectly. On the IntoVPS server the 'index.php' shows up.
Any ideas on how to get rid of the 'index.php' portion? Or even how to investigate what is causing the 'index.php' to show up in the first place?

You need to make sure you have setup mod_rewrite to work with CakePHP. Check the installation guides: 1.3, 2.0

Related

why subdomain on iis not working?

I am trying to add sub domain on local IIS and use this construction. i search in google and find many other article like this but it not work on my PC.
how can I resolve this problem?
It caused by my proxy. it was on and my DNS changes was not affected properly.
I disconnect my proxy (psiphon3 in my situation) an every thing work like a charm.

IIS 10.0 - using mod_rewrite rules

I develop websites on my local machine (windows 10 with IIS 10.0) and then upload them to a linux server where it uses the .htaccess files (mod_rewrite format) for url rewriting.
Is there any way possible to use this mod_rewrite format on my local machine (iis 10)? Every attempt I have made so far has failed to work.
This post mentions that an update version of ionic's isapi rewrite is available, but even this updated file does not appear to work for IIS10.
Also: I am aware that you can import rewrite rules through IIS Manager -> Url Rewrite -> (Actions) Import Rules. This however has not been ideal for my situation.
Would the best course of action for me, to be to run something like this apache server on my windows 10 machine and have websites setup through there for testing (which may then support the .htaccess files)?
Any advice, solutions, knowledge, feedback is appreciated! Thank you.

Old version of websites showing with Azure

I'm running into an issue where different versions of the site are showing up but it only seems to happen based on the URL you type in the address bar.
http://example.com -- shows correct version
http://www.example.com -- shows correct version
www.example.com -- shows old/wrong version
Thanks for any help in advance! It's becoming a nuisance and I can't tell if it's a DNS issue, or something wrong within the Azure web app.
This sounds like a DNS issue.
Are you using a third party service for your domain name? If that's the case, you likely haven't verified the "www" part with them.
Take a look at the guide here. You want to make sure that you have everything available:
Http
www
*
I fixed this by doing a couple things
First I had to add a CNAME record for www pointing to azuresitename.domain.com
Next I had to delete the bad folder out of /wwwroot/wp-content/cache/page_enhanced
After that, it was no longer showing the old/original version of the files.

URL rewriting in IIS for a php/linux guy

I'm a PHP/linux guy....
One of my customers came to me with an existing website/hosting package....
The hosting is windows (but with PHP.....I don't know, it just is)
I need to learn how to rewrite URLs in IIS..
I understand you usually do it with a separate thing you install, called url rewrite module?....Or, is there an equivalent of the .htaccess file which i can place in the root folder?
If yes, is this something that I should expect the hosting company to already have installed?
Is it done in PERL regex in IIS?
Please HELP.
I can't change the hosting comapny or any variables (windows/linux) in the current hosting as my customer cannot have a second where the site is down...so i need to know how to rewrite urls in windows/IIS
I am willing to learn little things like this anyways, for future situations...
It's IIS 7...windows 2008 and PHP...
I don't know if it's against rules to mention names of companies...please don't grill me if it is, just giving as much info as possible and maybe someone will have the same experience as me....
its fasthost..
Thanks
If you have access to the server / IIS then you can install http://www.iis.net/downloads/microsoft/url-rewrite
This will add a module where you can configure rewrites and redirects.
If you dont have access to the server / IIS and this module is installed then each web root will have a web.config file which contain the rules and other IIS configurations. You will have to contact the hosting company to see if the module is installed. It usually is.
This page gives an overview of both:
http://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module

URL Rewrite Deploy to Production Server

I've finished url dynamic rewrite module on my local computer, iis, everything is working but I have to deploy it to the production server now, which will cause errors. Do you have any idea how to avoid them?
If you have done similar thing before...
Thanks in advance
You could create a copy of the production server in a virtual machine and try to deploy your rewrite rules there.
VirtualBox is a simple engine to create a VM.
I do mine within a test vm environment then make my edits to the Production Site off hours to avoid the IIS Restart when saving rules.
If you want to move them up in one piece I have thought of making the edits to the machine.config file but after some discussions with our IT group found that was not a workable solution. Editing the rules on the Web Servers then testing them after being added is the course I have followed so far.

Resources