url-rewriting

add_rewrite_rule wordpress with w3 total cache

旧街凉风 提交于 2019-12-08 14:46:47
问题 I am trying to rewrite rule to seo friendly. Here is the code I put in my theme function.php add_action('init', 'add_my_rewrite_rule'); function add_my_rewrite_rule(){ add_rewrite_rule('^quiz/([^/]*)/([^/]*)?','index.php?pagename=quiz&quiztitle=$matches[1]&quizid=$matches[2]','top'); } add_filter('query_vars','set_quiz_query_var'); function set_quiz_query_var($vars) { array_push($vars, 'quiztitle'); array_push($vars, 'quizid'); return $vars; } Because this snippet didn't work, I also tried to

Stuck with URL-rewriting in htaccess with Apache: 1 Rule to Rule them all

家住魔仙堡 提交于 2019-12-08 13:41:16
问题 examine my current url rewrites for loading pictures: // Possibiities: 1 letter char, followed by `=` then the value (numbers/letters) // w= | h= | c= | q= | f= IMG-bla/blue_w100.jpg >> imgcpu?src=bla/blue.jpg&w=100 IMG-bla/blue_cp.jpg >> imgcpu?src=bla/blue.jpg&c=p IMG-bla/blue_h200.jpg >> imgcpu?src=bla/blue.jpg&h=200 IMG-bla/blue_w50_h200_fbw.jpg >> imgcpu?src=bla/blue.jpg&w=50&h=200&f=bw Essentially I would like to have 1 Ultimate rewrite url, that gives me the freedom to rewrite the

Converting an ExpressionEngine rewrite rule for and NginX server

有些话、适合烂在心里 提交于 2019-12-08 13:09:45
问题 I'm trying to migrate a working ExpressionEngine installation from an Apache environment over to an NginX environment on a different box. I have come across a problem trying to convert some .htaccess rewrites to NginX. The site uses the multi language module so needs a custom rewrite rule for every additional language. This is my standard vhost config which seems to get ExpressionEngine working nicely (without the multi language module): server { listen 80; server_name domain.co.uk www.domain

Extensionless SEO Friendly with Asp.net webforms

旧街凉风 提交于 2019-12-08 12:23:22
问题 How to get extension less and without query string SEO friendly URL for asp.net web forms.? 回答1: I have found out a very good article Here It is a very good blog post written on how to redirect urls which contain query strings as extension less seo friendly urls. One method of doing it by including Global.asax into the application. Here is the example. Include Global.asax into the application. <%@ Import Namespace="System.Web.Routing" %> inside global.asax file void registerroute

URL Rewrite -.htaccess

核能气质少年 提交于 2019-12-08 12:23:15
问题 Simple URL Rewriting for removing .php extensions from the links I am using the following code on the .htaccess file Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / ## hide .php extension # To externally redirect /dir/foo.php to /dir/foo RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php[\s?] [NC] RewriteRule ^ %1 [R=301,L] # To internally forward /dir/foo to /dir/foo.php RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{DOCUMENT_ROOT}/$1.php -f

mod rewrite clear home url for tomcat + apache

本小妞迷上赌 提交于 2019-12-08 12:18:19
问题 I have a struts app running on Apache front end of Tomcat via mod-jk. I am trying to use mod-rewrite to clean some of the action urls generate by struts. Example: rewrite (works fine) http://www.demo.com/context/user.do?action=aboutus to http://www.demo.com/context/aboutus using RewriteRule ^/msn/aboutus$ /msn/user.do?action=aboutus [PT,L] . Problem: I'd like to rewrite the http://www.demo.com/context/user.do?action=home to http://www.demo.com (homepage) I tried this RewriteRule ^/$ /context

How to hide # hash in a url using js

。_饼干妹妹 提交于 2019-12-08 11:26:34
问题 I have a scroll plugin that uses my div ID to scroll to a specific anchor, It's creating urls like this: http://example.com/#examplediv|700 I want to find a way using js or any other suggested method to hide the hash in the url I want to transform this: http://example.com/#examplediv|700 into this: http://example.com/ Any ideas? 回答1: You can either modify the scroll plugin you are using or add it yourself on the side but you will want to do something like this: Assumption: All DIVs that you

Using custom rewrite rules in Wordpress

六眼飞鱼酱① 提交于 2019-12-08 11:24:50
I am trying to create custom rewrite rules in WordPress so that I can pass data to a page based on what is in the query string. My page works fine: /retailers-a-z/?merchant=some_merchant and then also /retailers-a-z/?merchant=some-merchant&offer=some-offer I first tried to create a rewrite rule for this in .htaccess but since realised WordPress has it's own internal redirection database.. so after a lot of research I managed to come up with the following code... However, it is still not working.. Whenever I try to access /retailers-a-z/some-retailer or /retailers-a-z/some-retailer/some-offer

Using UrlRewriteFilter to remove .html extension from page? – Using GAE

痞子三分冷 提交于 2019-12-08 11:08:21
问题 having a bit of difficulty getting my url to write properly. I just found out about UrlRewriteFilter and it seems to be exactly what I need, since it's kind of difficult to rewrite urls using Java with GAE (it's disgustingly simple using python/go and app.yaml, but with Java it's a major pain in the ass for some reason, and I have to use Java). Here's what I have — <rule> <from>^/test.html$</from> <to>/test</to> </rule> I just want people to be able to type mysite.com/test instead of mysite

Rewrite rule of iis is not working

回眸只為那壹抹淺笑 提交于 2019-12-08 10:40:32
问题 I want to make a redirection like that: localhost:80/api/* to localhost:8080/api/* I'm trying to use iis to do this task but is not working, the rule that i have used is : (Pattern)(RE) ^api/(.*) (Action)(Rewrite) http://localhost:8080/{R:1} https://i.stack.imgur.com/6svRA.png How can it be done? 回答1: Your rule looks correct. I think the problem that you don't have ARR installed/enabled. Please follow this steps: 1) You need to install ARR module for IIS 2) Enable ARR. On the Application