rewrite

Prevent IIS7 rewrite from adding "index.php" to path on redirect?

Hi, I am trying to configure rewrite rules for a Wordpress MU 2.7 on IIS7 with PHP5 (fastcgi). At the moment I only have the following rewrite rule in Web.config: <rule name="Canonical Host Name" stopProcessing="true"> <match url="(.*)" /> <conditions logicalGrouping="MatchAll"> <add...

remove IIS 7 redirects

Hello, I am trying to debug an IIS server that keeps redirecting *.html files to *.aspx... it sends the following html in response to url.html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <meta htt...

What is the URL_CHANGED Event on IIS7 Request Tracing Log?

Hi, I just enabled Failed Request Tracing for a site and I get a URL_CHANGED event as the third item on the log. 1. GENERAL_REQUEST_START SiteId="1", AppPoolId="DefaultAppPool", ConnId="1610613013", RawConnId="0", RequestURL="http://example.com:80/test/wp-admin/", RequestVerb="GET" 15:35:54.176 2. GENERAL_SET_REQUEST_HEADER HeaderName...

.htaccess URL Rewrite to Subdirectory

What is the best method to rewrite anything below "/some/subdir" to "/some/subdir/projects" like from this: http://www.mydomain.com/some/subidr/test/ ... to this: http://www.mydomain.com/some/subdir/projects/test/ I found a similar question posted, but the solution didn't seem to work in my case. My current attempt so far (which do...

Does rewriting a URL help a search engine find the page?

My URLs look like "/pages.php?page=pageName" because I am using a database to supply the page's content. Does rewriting URLs to something like "/pageName" help search engines find the pages? If so how do I rewrite them? ...

Need help converting apache .htaccess code to lighttpd url_rewrite code

Hi All, I have this custom written CMS built on XAMPP. I'm trying to test the same on lighttpd to benchmark the so-called performance gains... but am stuck at the rewrite rules. I use the default rewrite rules of WordPress in my .htaccess which hands all url parsing over to my script as long as there aren't any files or directories sa...

DDD, Anti Corruption layer, how-to?

At the moment, we have to build an application which is based on a legacy one. Code for that old application should be thrown away and rewritten, but as it usually goes - instead of rewriting it, we need to base something new on it. Recently, we decided to go the DomainDrivenDesign path. So -- anti corruption layer could be a solution ...

Alternate Web.Config for IIS7 Rewrite Module Rules

Is it possible to move the rules created by the IIS7 rewrite module from the root web config into its own web config file like you can with appsettings and if so how? ...

Is there a url rewriting engine for Tomcat/Java ?

How can we provide URL-Rewriting support for Tomcat/Java ? mod_rewrite provides this functionality for Apache and can modify URLs even before they reach the handler (e.g. PHP). Is there a similar tool in Java/Tomcat ? To be more specific we need modifications such as http://www.somedomain.com/person/1 Maps to http://www.som...

Apache rewrite domain requests to subdomain requests

Hi-- Caveat: I am not an Apache expert or webmaster by training or trade (C++ developer), so I expect this is a fairly obvious, newbie-level question. Apologies in advance. I need an Apache 2.x rewrite rule that will map a requested domain into our domain as a subdomain. Simplified Example(s): domain1.com/index.php?option=80 -> do...

Refactoring or Rewriting Monolithic PHP Spaghetti Codebase

I've inherited a really poorly designed PHP spaghetti code project. It's been gaining a good bit of traffic recently and is starting to have performance issues on top of the poor monolithic code base. Its maxing out performance on a chunky 16GB dedicated machine when it really shouldn't be. I'm planning on doing some performance twe...

Line endings messed up in Git - how to track changes from another branch after a huge line ending fix?

We are working with a 3rd party PHP engine that gets regular updates. The releases are kept on a separate branch in git, and our fork is the master branch. This way we'll be able to apply patches to our fork from the new releases of the engine. My problem is, after many commits to our branch, I realized that the initial import of the e...

Idea on beginning block rewriting for top navigation of a module in magento..

Hi, I am a beginner in magento, have searched for block rewriting in google and forums,but looking for a simple and understandable example or some idea on how to rewrite block for customizing the top navigation of a module.Thanks 4 the help.. ...

Is this the best way to rewrite the content of a file in Java?

I want to rewrite the contents of a file. What I have thought of so far is this: Save the file name Delete the existing file Create a new empty file with the same name Write the desired content to the empty file Is this the best way? Or is there a more direct way, that is, not having to delete and create files, but simply change the...

How do i (url) rewrite without clobbering the mime?

I have a url similar to /abc/1.png i then rewrite it to /full/path/1.png. However it seems like the mime is being clobbered because when hitting view image with firefox i get a download instead of a page with the image. How do i solve this? I am using C# and ASP.NET you can view this post for more details http://stackoverflow.com/questio...

cakephp & nginx rewrite rules

Hi somebody please help me out, I’m trying to setup a cakephp environment on a Centos server running Nginx with Fact CGI. I already have a wordpress site running on the server and a phpmyadmin site so I have PHP configured correctly. My problem is that I cannot get the rewrite rules setup correct in my vhost so that cake renders pages ...

Url redirect to another page on the same site

Basically I want to redirect all requests to my domain to a specific page. For example, redirect all requests to page X, unless you are already on page X, in which case you should just load it. But my solutions just create an infinite loop :/ because 'new users'cant post hyperlinks, assume $LINK = 'http://www.example.com/' I tried... ...

htaccess url rewrite help

I have the following rewrite URL: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Rewrite all other URLs RewriteRule ^(.*)$ index.php?page=$1 [PT,L] Now I want to add an exception, that if the URL is something like mysite.com/abc it should ignore it and all things inside it also. mysite.com/abc/dfgs also sh...

Can I rewrite a Javascript function using Excel VBA?

Hi, Don't know how to do this at all, but if the onclick of a button is similar to below: onclick="ConfirmAvailable();" function ConfirmAvailable() { if (document.getElementById("AvailableCB").checked) { return YesNoDialog("'Are you sure?'"); } else { return true; } } Is it possible, if I set ConfirmAvailable()="" using Exce...

How to rewrite a file path or set the virtual path properly?

I want to write /img.png on my site and have it rewrite the path to E:/something/else/root/img.png. I can rewrite the path (and use File.Exist to verify it exist) however the server doesnt find the image. I am using transmit file but that is causing mime problems. How do i set the virtual path? i am using visual studios 9 (2008). ...