url-rewriting

Get rewritten URL with query string

て烟熏妆下的殇ゞ 提交于 2019-12-25 16:55:24
问题 I'm using tuckey URL rewriting with JSF. I would like to get the relative URL including parameters that the user sees: e.g. example.com/mypage?param=test At the moment if I do #{view.viewId} I get mypage.xhtml what I want to get is: mypage?param=test 回答1: The UIViewRoot#getViewId() returns the JSF view ID. You need to use HttpServletRequest#getRequestURI() to obtain the current request URI and HttpServletRequest#getQueryString() to obtain the current request query string. #{request.requestURI

SSO ADFS redirection issue with reverse proxy with ARR

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 16:42:57
问题 I have a reverser proxy setup with ARR and URL Rewite on IIS 8.5 public site exposed is http:/publicsite http:/publicsite act as a reverse proxy to the internal site http:/internalsite Every thing was working fine till we implement SSO for the internal site. Once sso is implemeted internal site is redirecting to http:/ssosite to get authenticated Since in ARR we have enabled the option "Reverse rewrite host in response headers" the redirection to sso site was not proper. To make it work

Redirecting root of site to subdirectory using .htaccess

我只是一个虾纸丫 提交于 2019-12-25 14:45:45
问题 A site of mine has all the files stored in a subdirectory. Previously, I used a 301 redirect to send visitors from site.com/specific/page to site.com/subdirectory/specific/page . I am now using this: RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?site.com$ RewriteCond %{REQUEST_URI} !^/subdirectory/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /subdirectory/$1 RewriteCond %{HTTP_HOST} ^(www.)?site.com$ RewriteRule ^(/)?$ subdirectory/index.php

Rewrite url ala Google Instant?

自古美人都是妖i 提交于 2019-12-25 14:45:13
问题 I have a e-commerce website built in Ajax and Js, when the user type a search keyword the list is pulled via ajax but the browser url, in my case doesn't change, so if the user reaload or simply bookmarks the address he 'll have to start form scratch loosing the keywords input. i noticed Google instead rewrites the url with the complete query, no hashtag or complex workaround...apparently how can i achieve that? consider i have complete control on my server so i can set my apache in any way i

htaccess url rewrite,remove querystring and file extension

早过忘川 提交于 2019-12-25 14:07:57
问题 my current url is something like: http://something.somedomain.com/about_us/profile.php?tab1=about_us a more complicated on is: http://something.somedomain.com/exchange_hosting/feature/outlook_web_access.php?tab1=exchange_hosting&tab2=feature&tab3=outlook_web_access i want to make them shorter: http://something.somedomain.com/about_us/profile http://something.somedomain.com/exchange_hosting/feature/outlook_web_access my .htaccess ################################# # Directory Indexes # ########

htaccess url rewrite,remove querystring and file extension

删除回忆录丶 提交于 2019-12-25 14:07:13
问题 my current url is something like: http://something.somedomain.com/about_us/profile.php?tab1=about_us a more complicated on is: http://something.somedomain.com/exchange_hosting/feature/outlook_web_access.php?tab1=exchange_hosting&tab2=feature&tab3=outlook_web_access i want to make them shorter: http://something.somedomain.com/about_us/profile http://something.somedomain.com/exchange_hosting/feature/outlook_web_access my .htaccess ################################# # Directory Indexes # ########

nice url with apache and php

拜拜、爱过 提交于 2019-12-25 14:06:34
问题 I have urls like /story.php?id=31 I want to show it as /31.html How? 回答1: You'll want to use Apache's mod_rewrite engine. The rule you are looking for would look something like this: RewriteEngine On RewriteBase / RewriteRule ^([0-9]+)\.html$ story.php?id=$1 [L] 回答2: mod_rewrite is the answer. See e.g. this guide or this one. /31.html -> /story.php?id=31 (rendering your links is another - and easier - issue) RewriteEngine on RewriteRule ^/([0-9]+)\.html$ /story.php?id=$1 [L,QSA] 回答3: Using

Urlrewriting.net IsPostBack always false

谁说胖子不能爱 提交于 2019-12-25 14:04:25
问题 I am working on rewriting URLs Urlrewriting.net, and have run into what seems to be a common problem but I can seem to fix it. I'll present a simplified case. The URL rewriting is working perfectly with the rule: <urlrewritingnet rewriteOnlyVirtualUrls="true" defaultPage="default.aspx" defaultProvider="RegEx" xmlns="http://www.urlrewriting.net/schemas/config/2006/07"> <rewrites> <add name="catalog" virtualUrl="^~/catalog/(.*)/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString"

Why URLRewriter.NET doesn't get querystring values?

江枫思渺然 提交于 2019-12-25 12:19:28
问题 I just started using URLRewriter.net with my blog and I have a problem with getting the query string values. I have a rule setting like: <rewrite url="~/blog.aspx(\?.+)?$" to="~/hiddenFolder/blog.aspx?mode=default&$2"/> But when I try to access /blog.aspx?page=1 the page parameter is not passed. Other parameters work great and there are no conflicts in rewriting rules. 回答1: I think the problem is that $2 is out of range as you only have one group in your RegEx. Try $1. EDIT In addition, it

Wordpress rewrite url not working on custom template

白昼怎懂夜的黑 提交于 2019-12-25 11:57:48
问题 The URL is: mywebsite.com/custom/?var1=random_text and I want mywebsite.com/custom/random_text here's the code in my functions.php file: add_filter( 'query_vars', 'wpse12965_query_vars' ); function wpse12965_query_vars( $query_vars ) { $query_vars[] = 'var1'; return $query_vars; } add_action( 'init', 'wpse12065_init' ); function wpse12065_init() { add_rewrite_rule( 'custom(/([^/]+))?/?', 'index.php?pagename=custom&var1=$matches[1]', 'top' ); } But it still returns 404 error. What am I doing