Search Results

Search found 3190 results on 128 pages for 'isapi rewrite'.

Page 28/128 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • mod_rewrite to change my urls

    - by user319859
    Hi, I've been fighting with mod-rewrite for a while. Basically, I have a website that I'm moving to a difference namespace/directory. What I'd like to do is change urls that look like this: http://mydomain.com/index.php?a=xxxxxxxxxx These urls will always have "index.php?a=". I have a different/new site that also has an index.php file, so it's important that I do a rewrite only when a= is in the URL. The new url should be like http://mydomain.com/ns1/index.php?a=xxxxxxxxxxx Seems pretty simple, but i can't seem to get mod_rewrite to do it for me, here's what I have: # rewrite old urls to new namespace RewriteRule ^/index.php\?a=(.*)$ /gc1/index.php\?x=1&a=$1 [R=301,L] See anything wrong?

    Read the article

  • In IIS6, how to provide authenticated access to static files on remote server

    - by frankadelic
    We have a library of ZIP files that we would like to make available for download at an ASP.NET site. The files are sitting on a NAS device that is accessible from out web farm. Here is our initial strategy: Map an IIS virtual directory to the shared drive at path /zipfiles Users can download the zip files when given the URL However, if users share links to the files, anyone can download them. We would instead like to make use of the ASP.NET forms authentication in our site to validate users' requests before initiating the file transfer. A few problems: A request for a zip file is handled by IIS, not ASP.NET. So it is not subject to forms authentication. In addition, we don't want ASP.NET to handle the request, because it uses up an ASP.NET thread and is not scalable for download of large files. So, configuring the asp.net dll to handle *.zip requests is not an option. Any ideas on this? One idea we've tossed around is this: Initial request for download will be for an ashx handler. This handler will, after authentication, generate a download token which is saved to a database. Then, the user is redirected to the file with token appended in QueryString (e.g. /files/xyz.zip?token=123456789). An ISAPI plugin will be used to check the token. Also, the token will expire after x amount of time. Any thoughts on this? I have not implemented an ISAPI plugin so I'm not sure if this will even work. I would like to avoid custom coding since security is an issue and I'd prefer to use a time-tested solution.

    Read the article

  • nginx subdomain rewrite

    - by ivan73
    I need a nginx rewrite rule to rewrite from: http://some-keyword.example.com to www. example.com/keyword.php?keyword=$some-keyword while domain without www in front still rewrites to www.example.com and 'www' isn't taken as a keyword. Please could you help me to solve this problem, how to write these two rules?

    Read the article

  • nginx rewrite question

    - by emacsian
    I have the following rewrite rule rewrite ^/ab(.*)/(.*)$ /repo/ab$1/rtest/$2 break; When the request file is /abname/index.php it gets rewritten to /abname/rtest/index.php But if the request is of the form /abname/dir1/index.php it gets rewritten as /abname/dir1/rtest/index.php but I would want it to be rewritten as /abname/rtest/dir1/index.php How do I write the rule ?

    Read the article

  • mod_rewrite to capture subdomain name

    - by Ricky
    I want to write a rewrite scheme such that: user1.example.net will redirect to example.net/user/user1 user2.example.net will redirect to example.net/user/user2 vise versa this is what i have in my .htaccess code. but it always redirects to example.net RewriteCond %{http_host} ^[^.]+.example.net [NC] RewriteRule ^([^.]+).example.net(.*) http://example.net/user/$1 [R=301,L] can someone please tell me what i did wrong? thank you.

    Read the article

  • varnish3, mod_geoip with apache2 using mod_rewrite and mod_rpaf

    - by mursalat
    I am maintaining a website with 3 different versions of the site, with 3 different languages, handles with a single system written in php, which takes in environment variables based on the domain name that is being accessed. These are the three sites: myshop.com : english international version myshop.eu : european version of site myshop.ru : russian version of the site when myshop.com is accessed from russia it is to be redirected to myshop.ru, and any country from europe accesses myshop.com, is redirected to myshop.eu, and international visitors stay at myshop.com, although they can go to the country specific site. All these redirections for the country is done using GeoIP apache2 mod in order to determine the country code, which is used in a RewriteCondition to state a RewriteRule, there are some exceptions of IPs that do not do the rewrite for, basically the IPs of the developer's PCs. The site has been doing just fine, until we decided to setup varnish to give the site a boost, it really did give it a great boost, but the country specific rewrites has become buggy. What started to happen is that a russian visitor can go to myshop.com and won't be redirected, until he clicks a random link (perhaps a link not cached by varnish yet) and the user is redirected to their specific country. For that i setup mod_rpaf, and for exceptions to the rewrite rule (for the developer's ip), i used this RewriteCond %{HTTP:X-FORWARDED-FOR} !^43\.43\.43\.43, and i restarted varnish and apache2, it worked for a while, then it messed up again. And whole day i have been doing changes however i have little no clue as to what's going on, sometimes it works, and sometimes it doesn't, and sometimes it half works, etc... As for geoip, i used a php to check the $_SERVER variable, and here is the general idea of the output [HTTP_X_FORWARDED_FOR] => 43.43.43.44 [HTTP_X_VARNISH] => 1705675599 [SERVER_ADDR] => 127.0.0.1 [SERVER_PORT] => 80 [REMOTE_ADDR] => 43.43.43.44 [GEOIP_ADDR] => 43.43.43.44 [GEOIP_CONTINENT_CODE] => EU [GEOIP_COUNTRY_CODE] => FR [GEOIP_COUNTRY_NAME] => France Now, thanks to the "random" redirects, i hardly have a clue as to what is going on, so can you guys please give me some ideas as to what tools to use to debug this? I have tried to see the redirect logs, but they really dont show much, and varnishlog isn't helping much either - although i must admit i am no professional at varnish. I believe the problem is with varnish trying to cache the url, and thus apache redirects are not being done properly, however visits the site first has a redirect, and based on that other users are served the content, depending on from where the user was when the cache was last updated, is it correct? if so, how can i solve the problem? Also, i have the option of using geoip redirects on varnish3 instead of using apache2 to do the redirects, is that what the best practice is? Any suggestion as to debugging this or to fix this would be helpful! thnx!

    Read the article

  • Rewritten URLs with parameter length > 255 don't work

    - by philfreo
    I'm using mod_rewrite to rewrite URLs like this: http://example.com/1,2,3,4/foo/ By doing this in .htaccess: RewriteRule ^([\d,]+)/foo/$ /foo.php?id=$1 [L,QSA] It works fine, except for when "1,2,3,4" turns into a string longer than 255 characters, Apache returns a "403 Forbidden". Is there some apache setting I should tweak?

    Read the article

  • mixing different technologies using ARR reverse proxy

    - by Jaepetto
    I'm currently trying to put together a proof of concept on mixing various technologies onto one web site in order to ease migrations and add flexibility. The idea is to create one 'mashup' site behind an IIS 7.5 ARR reverse proxy. For the time being the ARR reverse proxy forwards all request to our main site. The request are as follow: client -> ARR: Get / ARR -> Server 1: Get / Server 1 -> ARR: 200: /index.htm ARR -> client: 200: /index.htm ...so far so good. Let's say, I want to add a new site (root of another server) as a subsite of my main website. a simple inbound rule does the trick: <rule name="sub1" stopProcessing="true"> <match url="^mySubsite(.*)" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> <action type="Rewrite" url="http://server2/{R:1}" /> </rule> The requests now are: client -> ARR: Get /mySubsite ARR -> Server 2: Get / Server 2 -> ARR: 200: /index.htm ARR -> client: 200: /index.htm ... still ok. The issue comes when the site on server2 sends a redirection (e.g. to a login page). In the case of SharePoint, it will redirect the user to: /_layouts/Authenticate.aspx?Source=%2F ...which does not exists: client -> ARR: Get /mySubsite ARR -> Server 2: Get / Server 2 -> ARR: 301: /_layouts/Authenticate.aspx?Source=%2F ARR -> client: 301: /_layouts/Authenticate.aspx?Source=%2F client -> ARR: Get /_layouts/Authenticate.aspx?Source=%2F ARR -> client: 404: Not Found Does anyone know a way write the outbound rule to rewrite the response from server 2 "301: /_layouts/Authenticate.aspx?Source=%2F" to "301: /mySubsite/_layouts/Authenticate.aspx?Source=%2FmySubsite%2F"?

    Read the article

  • Mod_rewrite Mask URL

    - by user37143
    Hi, I need to rewrite https://mydomain1.com/chanagepassword to https://mydomain2.com/ssp then hide the url mydomain2.com/cp in browser and show https://mydomain1.com/chanagepassword. I got the first part working with the rule: Options +FollowSymLinks RewriteEngine on RewriteRule /changepassword https://mydomain2.com/ssp/ [R=301,L] However it shows https://mydomain2.com/ssp url on browser. How can I mask this and show https://mydomain1.com/chanagepassword Please support. Thanks.

    Read the article

  • nginx to lighttpd detecting request headers

    - by A.Jesin
    I'm moving a site form Nginx to Lighttpd. I was able to move everything except these nginx rules set $enc_type ""; if ($http_accept_encoding ~ gzip) { set $enc_type .gzip; } if (-f $request_filename$enc_type) { rewrite (.*) $1$enc_type break; } I think I can create the variable like this var.enc_type = "" in lighttpd but how do I check if the request header Accept-Encoding contains gzip

    Read the article

  • Apache: scope for environmental variables

    - by Anonymous
    While there's documentation available on Apache environmental variables, I can not find answer to one important question. Imagine I use rewrite rules to set environmental variable RewriteRule ... ... [E=something:1] What is the scope of "something" - global Apache server (this means "something" will be available for other request transactions), this request (means that "something" is only valid for THIS http request (and its related processing - but what's about internal redirects and other internal stuff - are they considered as THIS request, or another one?), and may be set differently within another (concurrent) request?

    Read the article

  • Lighttpd rewite url from specific client when using proxy

    - by Edu
    I need to send all CGI request to another server so I decided to use it with proxy. The problem is that I need to send the client IP to the server so I did the following configuration: $HTTP["url"] =~ "cgi" { $HTTP["remoteip"] =~ "^(.*)$" { url.rewrite-once = ("^(.*)$" => "$1?myip=%1") } proxy.server = ( "" => ( ( "host" => "XXX.XXX.XXX.XXX", "port" => 80, ) ) ) } the problem is that its not rewriting the URL.

    Read the article

  • mod_rewrite and % character

    - by pekrimen
    I need to rewrite a URL that contains one or more strings of characters incling a % character (for instance %123) into another string of characters including a % character (for instance %234). I am able to do this using the special THE_REQUEST attribute with something like this: RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)\%123(.*)\ HTTP RewriteRule .* /%1\%234%2 [R,NE] However, this does not work for URLs that contain more than one "%123" strings... The N option has no efect as it seems that the value of THE_REQUEST is not changed. Any ideas?

    Read the article

  • Nginx + CodeIgniter + Invision power board rewrite rule probem.

    - by Ufuk
    Hello, I have a setup where I have a folder structre like: / /application /system /forum index.php My ngix configuration: if (!-f $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; } location ~ /index.php { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include /usr/local/nginx/conf/fastcgi_params; fastcgi_param SCRIPT_FILENAME /var/www/vhosts/mydomain.com/httpdocs/index.php; } This setup works correctly and redirects urls to correct controller of codeigniter yet it does also forward www.mydomain.com/forum to codeigniter, which eventually shows a 404 page of CodeIgniter. Does anyone know the correct configuration for my setups? Thank you.

    Read the article

  • rewrite rule if iphone? [closed]

    - by daniel Crabbe
    hello there. just need one url on my site to check if its a mobile device and then rerite the url accordingly. want to rewrite; /play-reel/miranda-bowen/playpeaches-and-cream to /mobile/play-reel/miranda-bowen/playpeaches-and-cream RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$ [NC] RewriteRule ^play-reel(.*)\$ mobile/play-reel$1 [R=302,NC] RewriteRule ^mobile/play-reel/([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)$ play-reel-new-html5-02.php?director=$1&video=$2 [L] # the 3rd line works but cant get the url to change for it to be picked up can anyone see what's wrong? There's no erro best, Dan

    Read the article

  • Priorize /server-status front another .htaccess rewrite rules in apache2

    - by Wiliam
    It's possible to priorize /server-status front another rewrite rules? For example the next ones don't let the /server-status works: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-s RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !\. RewriteRule ^.*$ index.php [NC,L] I have to add this to the .htaccess to don't enter to the php project: RewriteRule ^server-status$ - [L] With mod_pagespeed of google, their statistics page works without adding them to the project .htaccess: /mod_pagespeed_statistics https://developers.google.com/speed/docs/mod_pagespeed/configuration My mod_status.conf: <IfModule mod_status.c> <Location /server-status> SetHandler server-status Order Deny,Allow Deny from all Allow from 127.0.0.1 # My allowed ips here </Location> </IfModule>

    Read the article

  • Nginx reverse proxy + URL rewrite

    - by jeffreyveon
    Nginx is running on port 80, and I'm using it to reverse proxy URLs with path /foo to port 3200 this way: location /foo { proxy_pass http://localhost:3200; proxy_redirect off; proxy_set_header Host $host; } This works fine, but I have an application on port 3200, for which I don't want the initial /foo to be sent to. That is - when I access http://localhost/foo/bar, I want only /bar to be the path as received by the app. So I tried adding this line: rewrite ^(.*)foo(.*)$ http://localhost:3200/$2 permanent; This causes 302 redirect (change in URL), but I want 301. What should I do?

    Read the article

  • .htaccess folder rewrite

    - by Lisa
    I have 3 URLS all pointing to the same site. www.abc.co.uk www.xyz.com www.123abc.org I have a folder /foo/bar which has lots of sub folders and files in etc. I want to rewrite this to /bar. So if I have www.abc.co.uk/foo/bar/sheep/page.html I want it to redirect to www.abc.co.uk/bar/sheep/page.html. Is this possible. Sometime I may have a URL like www.abc.co.uk/foo/bar/foo/page.html so this would become www.abc.co.uk/bar/foo/page.html. Only the first instance of foo would be rewritten.

    Read the article

  • Creating IIS Rewrite Rules

    - by Tom Bell
    I'm having a hard time converting old .htaccess rewrite rules to new IIS ones so I was wondering if anyone could point me in the right direction. Below are some example URLs I would like rewriting. http://example.org.uk/about/ Rewrites to http://example.org.uk/about/about.html ----------- http://example.org.uk/blog/events/ Rewrites to http://example.org.uk/blog/events.html ----------- http://example.org.uk/blog/2010/11/foo-bar Rewrites to http://example.org.uk/blog/2010/11/foo-bar.html The directories and file names are generic and could be anything. Any help would be greatly appreciated.

    Read the article

  • While Mail Forwarding with exim, how do I rewrite the To header with true destination address

    - by Jom
    I have mail forwarding setup with exim using a domain forwarding file. virtual_aliases_nostar: driver = redirect allow_defer allow_fail data = ${if exists{/etc/valiases/$domain}{${lookup{$local_part@$domain}lsearch{/etc/valiases/$domain}}}} file_transport = address_file group = mail pipe_transport = virtual_address_pipe retry_use_local_part domains = lsearch;/etc/localdomains unseen It is working fine. However, I would like to rewrite the "to" header. In my system filter, I would like to put something like: headers remove to headers add "To: $recipient:" I've tried: headers remove to headers add "To: $recipient:" headers remove to headers add "To: $h_env-to:" headers remove to headers add "To: $env-to:" The intent is to have the end recipient see their own email address in the To: line of their mail client. I can't seem to figure out what the correct header is for the final destination of the email so that I can put it in the to header. I've read through the Exim docs and can't seem to find it. I've also looked in the headers in an email at a mail client and can't see it there either. Any suggestions would be appreciated.

    Read the article

  • Please explain some of the features of URL Rewrite module for a newbie [closed]

    - by kunjaan
    I am learning to use the IIS Rewrite module and some of the "features" listed in the page is confusing me. It would be great if somebody could explain them to me and give a first hand account of when you would use the feature. Thanks a lot! Rewriting within the content of specific HTML tags Access to server variables and HTTP headers Rewriting of server variables and HTTP request headers What are the "server variables" and when would you redefine or define them? Rewriting of HTTP response headers HtmlEncode function Why would you use an HTMLEncode in the server? Reverse proxy rule template Support for IIS kernel-mode and user-mode output caching Failed Request Tracing support

    Read the article

  • Setting up apache rewrite rule to only forward if in a directory

    - by wooowoopo
    Hi, I currently have a site setup with the following in httpd.conf: <VirtualHost x.x.x.x:80> ServerName testsite ExpiresActive On ExpiresByType image/gif A2592000 ExpiresByType image/png A2592000 ExpiresByType image/jpg A2592000 ExpiresByType image/jpeg A2592000 ExpiresByType text/css A2592000 ExpiresByType application/x-javascript A1 ExpiresByType text/javascript A1 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript DocumentRoot /usr/local/www/apache22/data/thesite/trunk RewriteEngine On RewriteRule !\.(htc|js|tiff|gif|css|jpg|png|swf|ico|jar|html|doc|pdf|htm|xml)$ %{DOCUMENT_ROOT}/../platform.php [L] </VirtualHost> Where x.x.x.x is my IP. At the moment it forwards anything which is not in the set (htc|js|tiff|gif|css|jpg|png|swf|ico|jar|html|doc|pdf|htm|xml) to platform.php How htp://x.x.x.x/phpmyadmin to also forward. Would it be possible to only perform this rewrite conidtion if I am in a subdirectory. Eg. http://x.x.x.x/projectone So htp://x.x.x.x/projectone/login would direct to the platform.php Thanks

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >