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.
Related
I originally installed ColdFusion 11 in a local environment (windows 7) and selected "Use built in web server". Everything was working pretty good. Now months later, I realize I need to use a real web server for URL rewrites (Apache, IIS, etc) but there is no documentation I can find on how to do so.
I have attempted looking through the administrator's panel for any information, but couldn't even get a jumping off point. Any assistance would be greatly appreciated.
First, it sounds like you need to decide which web server you want/need to use and that could be determined by where you'll end up hosting your site. CF code is quite portable but if you're doing URL rewrites, file system access, etc... then you need to code those to match the production environment, otherwise you might find yourself having to rewrite and retest all that again.
As commented above, a lot of information about configuring CF for web servers is available by searching. You'll first need to install & configure your web server, so search around that first. Then you'll need to configure the web server to understand which requests to pass to ColdFusion's engine.
If it's IIS then you need to make sure IIS is installed and the following components are installed: ISAPI Extensions, ISAPI Filters, CGI, ASP .NET
Then configure an IIS site to point to your CF code and after that use the "Web Server Configuration Tool" application (installed with CF) that will associate the relevant file types with ColdFusion.
Most of the time it's as simple as that.
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
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
My coworker installed Linux Mint 14 Nadia onto a VM (using VirtualBox) and followed the following tutorial to install Apache, MySQL and PHP: http://community.linuxmint.com/tutorial/view/486. He then used the readme from http://www.bestpractical.com/rt/docs/4.0/ to install Request Tracker 4.0. Both of those went pretty well with very few hiccups along the way from what he told me. Now he's forwarded over the task to me and I'm attempting to get Request Tracker 4.0 configured correctly with the Apache server. Currently I can visit localhost and get the following message:
It works! This is the default web page for this server. The web server
software is running but no content has been added, yet.
I also configured it so when you visit localhost/rt you SHOULD see the Request Tracker interface, but I'm instead receiving the following page, and this is where I've spent most of my time stumped:
You're almost there! You haven't yet configured your webserver to run
RT. You appear to have installed RT's web interface correctly, but
haven't yet configured your web server to "run" the RT server which
powers the web interface. The next step is to edit your webserver's
configuration file to instruct it to use RT's mod_perl or FastCGI
handler. If you need commercial support, please contact us at
sales#bestpractical.com.
After a few moments it redirects me to bestpractical.com/rt/rt-broken-install.html. (only allowed 2 links apparently?)
I assume I have something misconfigured but am unsure what. I've been googling and fiddling around with this most of yesterday and today with no luck. It doesn't help that I'm fairly inexperienced with the linux environment, I'm sure.
If I understand how he installed it, he wants to set it up using FastCGI so I visited this site requesttracker.wikia.com/wiki/FastCGI and followed the guides there, but the documentation is quite awful and doesn't always line up with my environment, so I've had to put in a lot of guess and check work. I'll provide the code I've added to my config files so you see where I'm at for now
000-default in /etc/apache2/sites-enabled:
Alias /rt /opt/rt4/share/html
Alias /NoAuth/images /var/www/rt/share/html/NoAuth/images/
AddHandler fastcgi-script fcgi
ScriptAlias / /var/www/rt/sbin/rt-server.fcgi/
<Directory /opt/rt4/share/html/>
Order allow,deny
Allow from all
</Directory>
RT_SiteConfig.pm in /opt/rt4/etc:
Set($WebPath, '/rt');
Set($WebBaseURL, 'http://localhost');
If anymore information is needed, please let me know. Thanks in advance for any help!
The RT docs for web deployment give more detailed info for setting up Apache with fastcgi and for running at '/rt'. I think you'll want to initially try using the suggested Apache configurations and see if that gets you past the setup page.
(Note that those docs are available in the RT install as well in the docs directory.)
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.