url-rewriting

Remove HTML or ASPX Extension

人走茶凉 提交于 2020-01-18 06:15:36
问题 In a hosted IIS7 environment, I am looking for the simplest way to use extension-less file names. Simply I have the following pages: index.html (or .aspx) --> domain.com gallery.html --> domain.com/gallery videos.html --> domain.com/videos etc... I only have a handful of pages, I have no dynamic code, nothing special. All the examples I have found or methods I use in other sites I've developed revolve around dynamic content, pages, etc. I am simply looking for the simplest solution, ideally

Remove HTML or ASPX Extension

别等时光非礼了梦想. 提交于 2020-01-18 06:14:55
问题 In a hosted IIS7 environment, I am looking for the simplest way to use extension-less file names. Simply I have the following pages: index.html (or .aspx) --> domain.com gallery.html --> domain.com/gallery videos.html --> domain.com/videos etc... I only have a handful of pages, I have no dynamic code, nothing special. All the examples I have found or methods I use in other sites I've developed revolve around dynamic content, pages, etc. I am simply looking for the simplest solution, ideally

Remove HTML or ASPX Extension

最后都变了- 提交于 2020-01-18 06:12:01
问题 In a hosted IIS7 environment, I am looking for the simplest way to use extension-less file names. Simply I have the following pages: index.html (or .aspx) --> domain.com gallery.html --> domain.com/gallery videos.html --> domain.com/videos etc... I only have a handful of pages, I have no dynamic code, nothing special. All the examples I have found or methods I use in other sites I've developed revolve around dynamic content, pages, etc. I am simply looking for the simplest solution, ideally

Rewrite .htaccess for https

倾然丶 夕夏残阳落幕 提交于 2020-01-17 18:18:05
问题 I have an .htaccess file on my http site. Our system administrator made https settings and I can get my site by https. But the problem is that I can't rewrite .htaccess file. For example: RewriteEngine On Options -MultiViews RewriteRule ^(index|getReadings|admin|adminNewDesign)\/([A-Za-z]*)$ $1.php?id=$2 [L,QSA,NC] This works fine on http, but doesn't work on https. I tried like this: RewriteEngine On Options -MultiViews RewriteCond %{HTTPS} On RewriteRule ^(index|getReadings|admin

path string wise match redirection in htaccess

本小妞迷上赌 提交于 2020-01-17 10:28:17
问题 How to redirect the path using string compare. For example: We have path like (1000+ redirections) www.example.com/kb-123 www.example.com/kb-555 www.example.com/kb-666 Now using single rule how to redirect all above path's into below path's? www.example.com/article/kb-123 www.example.com/article/kb-555 www.example.com/article/kb-666 回答1: Try with below rule, RewriteEngine On RewriteCond %{REQUEST_URI} ^(.+) RewriteRule ^ /article/%1 [R=301,L] 来源: https://stackoverflow.com/questions/44269702

.htaccess url rewrite - remove .php remove www. convert ?id=10 to /10

烈酒焚心 提交于 2020-01-17 07:38:19
问题 As the title says, I need a quite complex url rewrite mechanism for a web-app as .htaccess rule. I've searched quite a lot now and tried hundred of different rewrite rules. So, basically this is what I need: User goes to: http://www.site.com/product.php?id=12 Server should redirect to: http://site.com/product/12 Once thing to mention: not all pages do append id's. So I also have: http://www.site.com/some/page.php which then should redirect to: http://site.com/some/page or from http://site.com

Apache RewriteEngine - Rewrite anything that not exists to index.php

为君一笑 提交于 2020-01-17 05:51:05
问题 I'm really struggling now. First of all, i searched on Google and here, and none of the solutions found worked for me. I don't really have much time right now to completely dig into Apache docs for solid understanding of the RewriteEngine(will do later for sure). WHAT I NEED I need to handle special requests from our Google Adwords campaign, which look like this: http://website.com/something/%first_param%/%second_param%/%third_param% In my document root directory, i have index.php where i

Umbraco 7 single page application routing

假装没事ソ 提交于 2020-01-17 05:36:08
问题 I have a problem with my single page application made around Umbraco 7. I would like to redirect all requests to AngularJS instead of Umbraco, for that I have added the following urlrewrite to UrlRewriting.config: <add name="SPA" virtualUrl="^~/(?![0-9]+/)([^\?]*?)$" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/" ignoreCase="true" /> But this redirects all responses to AngularJS, so now it not possible to open Umbraco at /umbraco. Does anyone know how to make a

URL Rewrites create compatibility issue with AjaxToolkit

戏子无情 提交于 2020-01-17 04:49:28
问题 I'm using the latest AjaxControlToolKit v15.1.3 and using the ... ajaxtoolkit:calendarextender for popping up the calender tool on click. everything works fine enough till there. now, when i add the URL rewrite code on the web.config file, the pop up on click no longer happens. any specific edit on the code i need to update for both to work. Here is the URL rewrite code: <rewrite> <rules> <rule name="RewriteASPX"> <match url="(.*)" /> <conditions logicalGrouping="MatchAll"> <add input="

How to create a EXCEPT Rewrite Rule at IIS

一笑奈何 提交于 2020-01-17 03:01:27
问题 I have a IIS Site with Rewrite Rule to redirect all requests to https. I have a internal webservice which works with http but rewrite rule modify "http" request to a "https". When happens, webservice returns an error "Object Moved". I tried use "AllowAutoRedirect" with true value but it doesn't work. How to create a EXCEPT Rewrite Rule to access this webservice ou how to make webservice work with https protocol? Thanks! Best Regards, Andre Mesquita 回答1: One way is to add the rule before the