rewrite

Having issues with IIS7 URL rewrite

I'm trying to rewrite the following URL, but I always get a 404 error. I know that the Url Rewrite is working because I have other rewrites working. Any idea what I am doing wrong? <rule name="PixelTracking"> <match url="^pixel([0-9]*).png?OrderTotal=([0-9]*)&amp;OrderID=([0-9]*)" /> <action type="Rewrite" url="^Confir...

mod_rewrite "too many redirects" problem

Trying, <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_METHOD} ^TRACE RewriteRule .* - [F] RewriteCond %{HTTP_HOST} ^(.*)dev\.example\.edu$ [NC] RewriteRule ^/test(.*)$ http://dev.example.edu/test/index.php/test$1 [NC] </IfModule> on an apache 2.2 server, to get this rewrite working to hide the "index.ph...

Apache mod_rewrite - rewriting from subdomain to main domain

Hi, I want to redirect a url abc.xyz.com/123 to xyz.com. So the file that will be accessed will be index.php of xyz.com. That index.php should have available to it both abc and 123 (so 123 will be $_SERVER['PHP_SELF'], and abc will come out of $_SERVER['HTTP_HOST']) to enable appropriate processing. abc.xyz.com already goes to xyz.com ...

htaccess html > php redirect + Wordpress rewrite permalinks structure

Hello All I have started a site up using html only, switched it over to php to make my life easier and have used the following code in the .htaccess to ensure all users (who may have bookmarked) are still seeing the right pages: Options +FollowSymlinks RewriteEngine on RewriteRule ^(.+)\.html$ http://domain.com/$1.php [R,NC] Now I am...

How to configure maintenance pages on Passenger suburi deployments

I am trying to get a maintenance page setup for a suburi deployment on Phusion Passenger for a rails app. All the documentation shows DocumentRoot ReWrite rules, which don't appear (don't think they should) rewrite on suburis. I tried hacking around on the ReWrite rules to point at the suburi, but I can't seem to get it to work. Has a...

Apache rewrite url need help

Hello everyone I need help for apache mode rewrite cause I'm novice and. Actually I don't know how to make this done. here is mys problem I have some urls that I want to edit them with apache 1- mywebsite/category.php ---> I want that url to stay like it is mywebsite/category.php?sid=categoryname ---> ...

RewriteRule (mod_rewrite)

What does that rewrite rule mean? RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] Sorry, even after reading the mod_rewrite syntax explanation, I didn't get it... :-/ Can someone explain me what that rule(s) does. Thanks a lot. ...

Apache RewriteCond to Lighttpd

I want to migrate some sites running on apache to Lighttpd. Can anyone help me to convert this Rewrite rule into a equivalent rule for Lighttpd: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] I'm reading the Lighttpd rewrite explanation (http://redmine.lighttpd.net/...

IIS 7 Rewrite Rules -> Apache rewrite rules

Besides being a horrible programmer I can't make proper use of Google. I am making a small web site and it uses IIS7 rewrite rules. It all worked good for me until now when I need to migrate it all to Apache and its rewrite rules. Are there tools that can convert ISS rewrite rules (they are XML in web.config) to apache rewrite rules. I...

Perform rewrite even if file at same URL exists (without getting error 500: infinite recursion)

I am trying to get rewriting working in an .htaccess file even when a file in the same location as the requested URL exists. i.e. I want a rewrite of /about/index.html to happen even if there is a file at /about/index.html . Currently I have: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^thehost.example.com$ RewriteCond %{R...

suggestion required related to rewriting and string manipulation

Hi everyone , I had to read from a file and for each data between delimiter i need to remove the white space and i have written the following program in jython When i am trying to rewrite ,its rewriting at the end of source file. filesrc = open('c:/FILE/split_doc.txt','r+') for list in filesrc.readlines(): #split the records by...

Transfer ISAPI_Rewrite code to Built-In IIS7 Rewrite Engine

Hi. I've transferred my IIS6-based website to IIS7. It uses ISAPI Rewrite. I want to use the built in IIS7 rewrite engine. I have the following code in my httpd.ini file: [ISAPI_Rewrite] RewriteRule /httpd(?:\.ini|\.parse\.errors).* / [F,I,O] RewriteRule ^(.*)$ http://www.workcity.co.il/$1 [R,R=301] RewriteRule /([^/.?]+) /sc.asp?p=$1 [...

Apache Rewrite and variable

Hi, I would like to rewrite: http://url.com/app%5Fname/action.do to http://url.com/context/action.do?value=1 My question is how to add the variable 'value' to the url for each rewrited URL (it's a hard coded value) ? #RewriteRule ^/app_name(.*) /context$1 Thanks! ...

URL Rewrite Apache locating files

I have a url rewrite that looks like this: RewriteEngine On RewriteRule ^cancun/tours/$ location-tours-listings.php?locationName=Cancun RewriteRule ^cancun/tours$ location-tours-listings.php?locationName=Cancun Problem is that now the page can't find the relative URL's, such as CSS, images, etc... Is there a way to fix this with a co...

Apache ReWrite rule to exclude an individual file or type of file?

Can you help me with an Apache rule to exclude a particular file name or type of file? Here are my current rules: RewriteRule ^/(?:blog)/ - [L] RewriteRule ^crossdomain\.xml$ - [L] (Based on first response) RewriteRule ^/(.*_css.*\.css.*) /$1 [QSA,L] RewriteRule ^/(.*_js.*\.js.*) /$1 [QSA,L] RewriteRule ^/(.*_swf.*\.swf.*) /$1 [QSA,L]...

porting from .net to java or vice versa, how long for the rewrite?

Say you have an application in either .net or java (web application). How long did it take you to port the application to the other platform? (I am assuming they general design was the same, just a straight port i.e. not changing the general design pattern radically). What I am interested in: It took me 4 months to code it in .net, an...

How to redirect requested uri that don't exists to 404 page with Apache?

I've now used rewrite to achieve part of my goal: rewriteengine on rewritebase / rewriterule ^([a-zA-Z][a-zA-Z0-9]*)$ resume.php?user=$1 How to add the 404 part? ...

Redirect without change URL

Hi all, is it possible to redirect an URL www.siteA.com to www.site2.com/Default.aspx?SiteSource=siteA without changing the browser's URL? Similarly, accessing www.siteA.com/Page2.aspx will redirect to the www.site2.com/Page2.aspx?SiteSource=siteA ...

Help in migrating from ISAPI_Rewrite to IIS7 URL Rewriting

Hi, I've this ISAPI_Rewrite rule: RewriteRule /([^/.?]+) /sc.asp?p=$1 [I,L] This rule should rewrite Urls like: /some-article /article2 and shouldn't rewrite Urls like: /home.asp /admin (because there's a directory named admin) /admin/ /sites/gutterman It works great in ISAPI_Rewrite Yesterday I bought ...

What does this Rewrite rule mean?

Im installing phpancake, there is a folder there shema like this application/ install/ library/ public/ sql_schema/ install.html install.php What does this rule mean? RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRu...