url-rewriting

Apache .htaccess: How to rewrite backslash with slash on Firefox?

孤街浪徒 提交于 2019-12-06 06:04:44
问题 How to rewrite backslash '\' with slash '/' on Firefox? Chrome, IE, Safari, Opera has build browser rewrite backslash with slash. But Firefox 3.6.13 returns 404 error page . # Why Firefox returns 404 error page? RewriteCond %{REQUEST_URI} (.*)\\(.*) RewriteRule .* %1/%2 [R=301,L] 回答1: It is Apache and FF bug, https://issues.apache.org/bugzilla/show_bug.cgi?id=35256 Hopefully it'll be fixed in soon feature. AllowEncodedSlashes should really be "on" by default and probably even deprecated. ...

.htaccess folder to virtual-folder rewriting

假如想象 提交于 2019-12-06 05:36:01
问题 Is it possible with Apache's RewriteEngine to do the following, and how? This is the environment: domain.com has a folder that contains a index.html page, htaccess is set to strip files so domain.com/folder/ opens domain.com/folder/index.html Now what i need to achieve is display domain.com/folder/ content (the index.html) as it comes from domain.com/virtualfolder/ where virtualfolder does not exist and the url has to show as domain.com/virtualfolder/ I hope what i wrote it is understandable.

SEF url without name with core php and .htaccess

不问归期 提交于 2019-12-06 05:26:17
I want to make SEF url In that i want to remove file name also from the url. my site is in the core php, I manage to remove the extension from the url but didn't have idea that how to remove the whole file name from the url. As i searched on google i got this code for the .htaccess RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] I have no idea that how to write header in php so it goes in related file but don't show the file name in url. <a href='http://mysite.com/edit/user/2/1'>click</a> Now if i click on above link it does goto edit

How do I configure Undertow handlers to support proper rewriting for SPA bookmarking?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 04:52:01
I am trying to configure JBoss EAP 7 (via Undertow) to properly rewrite any SPA URLS back to the SPA's index.html using Undertow handlers. Unfortunately, my API is located at /api , so I need to let any requests pass through which start with /api . Here is my current configuration (lifted from another SO answer): not equals(%R, '/my-app') and not equals(%R, '/my-app/') and not equals(%R, '/my-app/index.html') and not path-prefix('/my-app/api') and not regex('/my-app/.*\.js') and regex('/my-app/.+') -> rewrite('/my-app/index.html') Unfortunately, this doesn't seem to be rewriting anything. How

HTTPS URL Rewrite Rule for Specific Page Using IIS 7.5

本小妞迷上赌 提交于 2019-12-06 04:42:59
问题 I am trying to get URL rewrite in IIS 7.5 to redirect to HTTPS for a "single page". The rest of the domain should remain HTTP. To do this, I am editing my Web.config file. Can somebody tell me what I am doing wrong in the below rule: <system.webServer> <rewrite> <rules> <rule name="SpecificRedirect" stopProcessing="true"> <match url="^register.aspx$" /> <action type="Redirect" url="https://mail.domain.org/register.aspx" /> </rule> </rules> </rewrite> </system.webServer> Below is what my URL

Remove file extensions from urls

旧街凉风 提交于 2019-12-06 04:39:32
I've never used mod_rewrite but i want to remove all file extensions from my urls for a website. What is the rule that i would need to do this? I've tried this, but that gives me an internal error every time i click a link on my website RewriteRule ^(.*)$ $1.php [L] What you want to do is first check if the file exists, this will prevent the infinite loop that is causing the 500 error. It will also make other non-php file requests work (ie: images, css, etc). RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $1.php [L] Options +MultiViews is probably

How to rewrite URL in an ASP.net site

橙三吉。 提交于 2019-12-06 04:39:25
问题 I want to rewrite URL in an asp.net site What i need is i don't want the user to see in which language the site was created i.e it should not have www.examplesite.com/index.aspx as address instead i want it as www.examplesite.com/index I don't want the user to see the extension of files If this question is not related to Stackoverflow please redirect this question to the respective site of Stack Exchange. Any help is appreciated. 回答1: You can do this at a simple level in the Global.asax file

IIS 7.5 URL Rewrite rule to handle request based on user agent

时光总嘲笑我的痴心妄想 提交于 2019-12-06 04:36:21
问题 I have written a rule to redirect request based on user agent. The rule is set to redirect default requests (not mobile) to Domain1 and requests from mobile to mobile domain Domain2 . Currently even after applying mobile redirect all request from mobile are taken to Domain1 Find the redirect rule below. Can anyone tell me what I'm missing? <rewrite> <rules> <rule name="Mobile UA redirect" enabled="true" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_USER_AGENT}"

Different rewrite mode for CFWheels website root

给你一囗甜甜゛ 提交于 2019-12-06 04:28:42
I need an advice on researching the following issue. Wheels website has set(URLRewriting="On") configured, everything looks fine except root page. All links built with linkTo look like website.tld/controller/action . But on a / mode "switched" into the partial and links look like website.tld/index.cfm/controller/action . Interestingly, if default route page accessed explicitly (/pages/index in this case) -- URLs built properly. Website is running in Tomcat with Apache2 under Ubuntu, standard Wheels rewriting rules configured directly in a vhost config, as a workaround to known issue with

How to create a redirection for WCF service?

☆樱花仙子☆ 提交于 2019-12-06 04:23:19
问题 I have a WCF service hosted on my website A. And I have another site B, that redirects all requests to my site A using IIS URL rewriting. However, site B doesn't handle any requests to .svc files, returns 404 not found. Any idea how to make it working? UPD redirection config is like this: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Redirect" stopProcessing="true"> <match url=".*" /> <action type="Rewrite" url="http://localhost/site_A