skip to Main Content

Apache – .htaccess assistance with rewrite rule

I have trouble rewriting virtual directories as variables.. can someone help please? The URL is: https://www.example.com/content/index.php?var=1-dKein4i59xcNjfks I want it to look like: https://www.example.com/content/featured/1-dKein4i59xcNjfks where "content" is a real directory and "featured" and "1-dKein4i59xcNjfks" are virtual my current .htaccess code is…

VIEW QUESTION

troubleshooting Azure API Management URI rewrite

Arriving URL format https://my-apim.azure-api.net/product/service1/v3/service1/operation. Client library prefix second "service1" to the URL, my base URL: "https://my-apim.azure-api.net/product/service1/" , version - v3, operation - "/operation". Because of second "service1" in the URL APIM can't find matching API operation. I have added rewrite-uri…

VIEW QUESTION

URL variable/value doesn't get picked up by php

I have this code to create a new OrdID if no value for this variable exists: If ($OrdID=="") { $con = mysql_connect("localhost","xxx","xxx"); mysql_select_db("xxx_Order", $con); $query=mysql_query("Select Max(OrdID) FROM `Order`"); while($row=mysql_fetch_array($query)) { $OrdID= $row[0] + 1; } $sql = "INSERT INTO `xxx_Order`.`Order`…

VIEW QUESTION

Asp.net – Regex negative lookahead true then ignore rest of regex

I'm using the following IIS Rewrite Rule to block as many bots as possible. <rule name="BotBlock" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_USER_AGENT}" pattern="^$|b(?!.*googlebot.*b)w*(?:bot|crawl|spider)w*" /> </conditions> <action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> </rule> The goal is to block all user…

VIEW QUESTION

Asp.net – IIS Rewrite Module exclude bots but allow GoogleBot

I'm using the following IIS Rewrite Rule to block as many bots as possible. <rule name="BotBlock" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_USER_AGENT}" pattern="^$|bot|crawl|spider" /> </conditions> <action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> </rule> This rule blocks all requests with an…

VIEW QUESTION
Back To Top
Search