url-rewriting

Using nginx rewrite with many individual URLs

情到浓时终转凉″ 提交于 2019-12-11 04:57:47
问题 I need to rewrite a large number of URLs (about 250) on nginx. from: http://xyzwiki.de/wiki/index.php?title=Article1 to: http://wiki.zyx.de/wiki/AlternativeNameForArcticle1 As obviously the source does use classic url and also other names for the individual articles I have a table with all the sources and destinations. I have tried to work with the basic redirect examples however I did not get it to work. I think the reason for this might be that the source URLs use URL parameters - but I did

htaccess mod_rewrite for Opencart search page URLs

旧街凉风 提交于 2019-12-11 04:54:39
问题 I'm having some difficulty creating an htaccess mod_rewrite rule which would take the following URL: http://www.mydomain.com/index.php?route=product/search&filter_name=SEARCH%20CRITERIA and make it something more along the lines of: http://www.mydomain.com/search/SEARCH-CRITERIA or even http://www.mydomain.com/search?filter_name=SEARCH%20CRITERIA Everything I've tried seems to break the SEO-friendly URLs that are auto-generated by the Opencart framework. How can this be done? 回答1: In Your

How to remove last character in request url using apache?

▼魔方 西西 提交于 2019-12-11 04:53:33
问题 I need to remove last character(#) in request url using apache. Example www.example.com/test/test?data=value1,value2,value3# how to remove # value in the url. (OR) Make apache to allow #. Now i am getting 400 response in apache. 回答1: # is reserved character according to rfc3986 section-2.2 and it seems there is no way to make Apache ignore it, it will throw error 400 immediately when it gets the request (even without waiting for headers to arrive). Your best bet may be to write simple custom

UrlRewriteFilter: www and https redirect

房东的猫 提交于 2019-12-11 04:52:46
问题 I am using Tuckey UrlRewriteFilter to force users to go to the 'www' and 'https' version of my web. I mean next 3 URLs must redirect to https://www.myweb.com http://www.myweb.com http://myweb.com https://myweb.com The problem comes with the last one, I cannot find the solution to put 'www' for 'https'. I have the next rule that makes 2 first cases work without problems: <rule> <name>Domain Name Check</name> <condition name="host" operator="equal">myweb.com$</condition> <condition type="scheme

IIS 7 URL Rewrite match for particular URL

被刻印的时光 ゝ 提交于 2019-12-11 04:49:57
问题 I would like to match exactly https://internet.dev.local/ KYR url (without / into end) and redirect or rewrite to https://internet.dev.local/ KYR/ (with /). I am trying the following rule but it matches other URLs as well e.g. https://internet.dev.local/KYR/Admin/Form/Default.aspx?signup=false , which is wrong. so how can I achieve this? <rule name="Static redirect" patternSyntax="ExactMatch" stopProcessing="true"> <match url="https://internet.dev.local/KYR" negate="true" /> <conditions> <

Page anchor with mod_rewrite?

ⅰ亾dé卋堺 提交于 2019-12-11 04:43:00
问题 I'm trying to set up page anchors on a website that uses mod_rewrite (Apache2 running on Ubuntu Server 9.04). My htaccess file looks like this: RewriteEngine On RewriteRule ^information.php/([A-Za-z0-9-]+)/?$ information.php?display=$1 [NC,NE] If I was using regular URL's the query would look something like this: http://mydomain/information.php?display=faq#cost I'm hoping to get something like this: http://mydomain/information/faq/cost Is this possible? My understanding is that modrewrite

Redirecting %{QUERY_STRING} to friendly url

ε祈祈猫儿з 提交于 2019-12-11 04:34:48
问题 I'm trying to add one last improvement (regarding htaccess), and that is that I would like it to redirect /?mod=inicio to /inicio . So I'm trying to do it with the following code, but It keeps building the url like this /inicio?mod=inicio RewriteCond %{QUERY_STRING} ^mod=([a-z]+)$ [NC] RewriteRule .* /%1 [L] Same thing with extra parameters: from /?mod=x&type=y-z to /x/y-z 回答1: Try these rules instead: RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /\?mod=([a-z]+)&type=([a-z\-]+) RewriteRule ^ /%1/

IIS URL Rewrite For URL Link with %3D

让人想犯罪 __ 提交于 2019-12-11 04:34:40
问题 I am having an issue where someone has posted a URL for my asp.net mvc3 site that contains %3D instead of an equal sign after my id parameter like this: http://ultimategamedb.com/Article/Article?id%3D398210c1-529e-4909-9793-a11b8a832dcc . I have tried various rewrite rules but cannot seem the URL to rewrite correctly to: http://ultimategamedb.com/Article/Article?id=398210c1-529e-4909-9793-a11b8a832dcc . It is a problem because the URL with the %3D gives a 404 error. If possible I would like

How to proxy Frontend images into Backend images?

浪尽此生 提交于 2019-12-11 04:29:33
问题 I'm facing a little problem to handle images. I have a Front server (site.com) and Back server (api.site.com), both linked by an NFS Storage for images. The original images are stored in the Back server. The Front server got only Nginx & NodeJs The back office got only Nginx & PHP When I want to display an image: site.com/img/path-to-img-s250x250.jpg , it will search it in the NFS, if it exists, it's gonna be displayed, if not, then get the original image, resize it and save it in the NFS

MVC - Rewrite URL to display domain only

强颜欢笑 提交于 2019-12-11 04:19:53
问题 I am using MVC 1.0 in .NET 3.5 Framework. I have a client who would like the URL to be displayed as www.example.com instead of www.example.com/{controller}/{action}/{id} . The server that the site is hosted on is utilizing IIS 6. I do not have direct access to this server. With that in mind, can this be done? Someone suggested using ISAPI_REWRITE. I've found a few examples but none that actually explain correctly what needs to be done. Alternatively, if this cannot be done throughout the site