url-rewriting

ASP.Net - Path Problems caused by Encoded URLs

谁说我不能喝 提交于 2019-12-13 03:09:25
问题 I am building a web store and I am having a bit of a problem with some of the urls. I have a large directory of departments and categories in my database that I am using to form my main menu. The URLs have the form Application/Store/Department/Category (All store URLs are rewritten to store.aspx?Querystringstuff) The problem is that some of the urls generated by my code work, but prevent the page's CSS from loading properly. It is specifically the URLs who's source text contain slashes. I am

Apache, .htaccess - Forbidding direct access to a file, but allow rewrites to go there

隐身守侯 提交于 2019-12-13 03:04:35
问题 I've figured out how to write something like www.test.com/test to www.test.com/test.php. This is useful to give a simpler browsing experience and obscure the use of the PHP. However, I'd like to go farther and disallow access to www.test.com/test.php completely, and allow access only through www.test.com/test in order to prevent people from discovering the use of PHP by simply trying it in a URL. The problem is that if I disallow access to www.test.com/test.php then www.test.com/test no

Regex to redirect a url using url rewrite

跟風遠走 提交于 2019-12-13 02:57:35
问题 OK, I'm wondering if someone can lend a hand with a regex I'm trying to write. Basically, what I want to do is use IIS urlrewrite module to do a redirect to a specific URL if the user accesses a URL on another site. The only catch is I have to also capture a bit of the query string, and move it into the redirect. so here is the input, the URL that a user may access would look like: https://of.example.com/sfsv3.aspx?waform=pro&language=en I want to match that URL (either http or https, case

Using URL Rewrite for Cross-Domain Http Requests

我只是一个虾纸丫 提交于 2019-12-13 02:56:34
问题 I am trying to write an inbound rewrite rule that basically captures all the requests to the root folder /api/*, and rewrite it to api.v2.movideo.com respecting the HTTP vs HTTPS traffic. I followed the step by step instructions here: http://code.movideo.com/Setting_up_IIS7_to_use_URL_Rewrite_2.0_for_Cross-Domain_XMLHttpRequest_Calls I installed Application Request Routing http://www.iis.net/expand/URLRewrite Followed all the steps on that page, removed the instructed headers, did everything

Rewrite URL using .htaccess file in case there is used parameters which is not in white list

末鹿安然 提交于 2019-12-13 02:37:53
问题 Need to achieve the following: Rewrite URL using .htaccess file in case there is used parameters which is not in white list. Example: Whitelisted parameters: phone, fax, zip Input URL: http://hostname/adress?phone=1234567890 Resulting URL: http://hostname/adress?phone=1234567890 Input URL: http://hostname/contacts?fax=1234567 Resulting URL: http://hostname/contacts?fax=1234567 Input URL: http://hostname/test?zip=1234 Resulting URL: http://hostname/test?zip=1234 Input URL: http://hostname/test

Can't get static redirects to work with IIS Url Rewrite 2.0

我怕爱的太早我们不能终老 提交于 2019-12-13 02:31:55
问题 Running the following IIS URL Rewrite setup locally and can't get it to work (from web.config): <rewrite> <rewriteMaps> <rewriteMap name="StaticRedirects"> <add key="^tvb/" value="/tv/" /> </rewriteMap> </rewriteMaps> <rules> <rule name="StaticRedirectsRule" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{StaticRedirects: {REQUEST_URI}}" matchType="Pattern" pattern="(.+)" ignoreCase="true" negate="false" /> </conditions> <action type="Redirect" url="{C:1}"

Append query string to all URLs with .htaccess

放肆的年华 提交于 2019-12-13 02:27:18
问题 For testing purposes, I would like to append a query string (let's say testing=true) to any url requested from my website. E.g. I want to change example.com example.com/product example.com/search?q=string to example.com? testing=true example.com/product? testing=true example.com/search?q=string& testing=true I tried this: RewriteRule ^/?(.*) http://example.com/$1?testing=true [L,R,NE] but it breaks the site. Not an expert. Any ideas? EDIT: I should add I'm working with CodeIgniter (PHP) and

Removing index.php and another page inside the root folder from URL with .htaccess

放肆的年华 提交于 2019-12-13 02:20:43
问题 In my Root folder I have index.php and profile.php . Currently I'm using these rules for rewrite my index.php from example.com/index.php?a=profile&u=user1 to example.com/profile&u=user1 RewriteEngine On RewriteCond %{request_filename} -f RewriteRule ^(.*) $1 [L] RewriteRule ^(([^/]*)+)(/([^/]{0,32})(/.+)?)?$ index.php?a=$1&q=$3 [L] RewriteRule ^welcome/([^/]+)/?$ index.php?a=welcome [NC] RewriteRule ^page/([^/]+)/?$ index.php?a=page&filter=$1 [NC] It works fine but now I want to rewrite my

PrettyFaces & JSF 2 : Do we always need to pass parameters to the URL to retrieve them?

两盒软妹~` 提交于 2019-12-13 01:53:52
问题 Do we always need to pass parameters to the URL to retrieve them ? In my example , I can't get to retrieve my param named 'study'; How should i do that ? XHTML File Sender: <h:commandButton value="Send" type="button" action="pretty:participant"> <f:param name="study" value ="test" /> </h:commandButton> XHTML File Recever: <h:outputFormat value="Print : {0} "> <f:param value="#{study}" /> </h:outputFormat> Pretty Config XML : <url-mapping id="participant"> <pattern value="/Participant/New/" />

Strange URL RewriteRule .htaccess Issue needs explaination

为君一笑 提交于 2019-12-13 01:27:17
问题 I have URLs like book.php?id=23 and using htaccess to make them book/id/title I tried this RewriteRule ^book/([0-9]+)/([^/]+)/?$ book.php?id=$1 [NC,L,QSA] but it didn't work, it was forwarding to books.php but no $_REQUEST data it turned out it was because the url reference was the same as the name as the php file I was calling with help from the community to work around this worked RewriteRule ^books/([0-9]+)/([^/]+)/?$ book.php?id=$1 [NC,L,QSA] this is my current working .htaccess: