IIS URL Rewrite does not work on a complex URL

I have 2 URL redirection rules:

    <rewrite>
        <rules>
            <clear />
            <rule name="al - helyek/al (kieg)" enabled="true" stopProcessing="true">
                <match url="^test1/al/(.*)RootFolder=%2Ftest1(.*)" />
                <action type="Redirect" url="helyek/al/{R:1}RootFolder=%2Fhelyek{R:2}" />
            </rule>
            <rule name="al - helyek/al" enabled="true" stopProcessing="true">
                <match url="^test1/al/(.*)" />
                <action type="Redirect" url="helyek/al/{R:1}" />
            </rule>
        </rules>
    </rewrite>

But the first doesn’t work, only the second.

Test URL:
http://test:29001/test1/al/Megosztott%20dokumentumok/Forms/AllItems.aspx?RootFolder=%2Ftest1%2Fal%2FMegosztott%20dokumentumok%2FTeszt&FolderCTID=0x01200077BA4D1F1CDCF3498096871FD748FB37&View=%7B70C95A37%2D4FE1%2D4A60%2DA100%2D61E529A1DB56%7D

This is a SharePoint Site Collection.

What could be the problem?

Thank you in advance for your help.

Magento 1.9 – How to rewrite magento cms page to custom url with query parameter

I want to rewrite CMS page url to custom url.

For eg. CMS page url is "/result/?q=test" and rewrite url should be "/demo/test"

For this I’m trying to below htaccess rule

RewriteRule ^demo/?$ /result/?q=$1 [QSA,L]

Url "/result/?q=test" is working, but the url "/demo/test" is showing 404 not found.

What rule should I use this?

url rewrite – Magento 2 Admin Url or any other URL you are requesting not found on server 404

I tried all possible solutions on the internet but the still issue persists.

Solutions that tried

1. ( Many solutions suggest changes in apache in following files ) /etc/apache2/apache2.conf

Enabling apach2 rewrite mode first a2enmod rewrite
enter image description here

Changing from

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

to

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

This sometimes works but in my case no luck

2. Using /index.php/ after base URL for instance magento.com/index.php/admin
enter image description here

In this case, few links were able to open but the admin was not opening

I will rewrite your article into plagiarism free unique content for $5

I will rewrite your article into plagiarism free unique content

Are you looking for an article rewriting service that is both professional and affordable?

Avoid being conned by the Auto Article Spinners.

Hire this premium article rewriting gig to get professional content that has been manually written!

I am an experienced article rewriter who has produced many high-quality articles and blog posts for a variety of websites. In this gig, I will manually paraphrase and edit each sentence, making it engaging and readable (not spun) for you and your readers.

  • Excellent Quality Content
  • Manually Written
  • Not spun and 100% readable
  • Keyword research
  • FastDelivery
  • Plagiarism Report with your order
  • Delivered in any format, PDF, Doc etc
  • Please message me if you have any queries or special instructions
  • Basic gig price is up to 250 words

.(tagsToTranslate)rewrite(t)article(t)unique(t)paraphrase(t)articlerewriter

permalinks – Rewrite rules showing blog pagination 404 error

I added below script in my website to setup custom language slug like th, se etc.

After adding this below script my pages are working like.

Issue: but my blog pagination like throwing 404 error.

Script custom permalink and rewrite rules

/*---------------Page permalinks ---------------*/
    add_filter( 'page_link', 'prefix_custom_link_option', 10, 3 );
    
    function prefix_custom_link_option($link, $post_id , $sample){
        global $wp_rewrite;
        $category = get_the_terms($post_id, "nk-post-translation");
        $post = get_post($post_id);
        if (!empty($category) && $category(0)->slug == "th") {
            $link = str_replace(home_url(),home_url('th'), $link);
        } elseif (!empty($category) && $category(0)->slug == "se") {
            $link = str_replace(home_url(),home_url('se'), $link);
        } else {
            $link = str_replace(home_url(),home_url(), $link);
        }
        return $link;
    }
    
    
    /*-----------------page rewrite rule -----------*/
    add_filter('page_rewrite_rules', 'my_new_page_rewrite_rules');
    function my_new_page_rewrite_rules($page_rewrite) {
        $rules('^th/(.*)') = 'index.php?&pagename=$matches(1)'; //for thai pages
        $rules('^se/(.*)') = 'index.php?&pagename=$matches(1)';  //for swedish pages
        $rules('^(.*)') = 'index.php?&pagename=$matches(1)';   //for default or english pages
        return $rules;
    }
    
    
    add_filter('post_link', 'custom_permalink', 10, 3);
    add_filter('post_rewrite_rules', 'wp_insertMyRewriteRules');
    
    //rewrite_rules_array
    
    add_filter('init', 'flushRules');
    
    // creating of post permalink from taxonomy slug
    function custom_permalink($permalink, $post, $leavename) {
        $category = get_the_terms($post->ID, "nk-post-translation");
        if (!empty($category) && $category(0)->slug == "th") {
            $permalink = str_replace(home_url(),home_url('th'), $permalink);
        } elseif (!empty($category) && $category(0)->slug == "se") {
            $permalink = str_replace(home_url(),home_url('se'), $permalink);
        } else {
            $permalink = str_replace(home_url(),home_url(), $permalink);
        }
        return $permalink;
    }
    
    //flush the existing rules of taxonomy slug rules
    function flushRules() {
        global $wp_rewrite;
        $wp_rewrite->flush_rules();
    }
    
    // inserting new rules of taxonomy slug
    function wp_insertMyRewriteRules($post_rewrite) {
        $post_type = 'post';
        $rules('^th/(.*)$') = 'index.php?post_type=' . $post_type . '&post=$matches(1)&name=$matches(1)'; 
        $rules('^se/(.*)$') = 'index.php?post_type=' . $post_type . '&post=$matches(1)&name=$matches(1)'; 
        $rules('^(.*)$') = 'index.php?post_type=' . $post_type . '&post=$matches(1)&name=$matches(1)'; 
        return $rules;
    }

recursion – How to rewrite this part of Mathematica code in Matlab

I have the following part of Mathematica code which contain recursive function and I want to rewrite it in Matlab (really, I don’t have any experience in Mathematica).

Can any one help me to do this?
thank you in advance.

    `Np = IntegerPart(L/(2*Om));
      
       Et = L - Np*2*Om;
        
       $RecursionLimit = 1000;

       dz = 5*10^-9;

       Ns = Round(N(2*Om/dz));

       Nsrem = Round(N(Et/dz));

      Mp(l0_, th_, ph_) := Module({pm, x, exm, smat},

      pm(x_) := Ppm(x, l0, th);

      exm(n_) := MatrixExp(I pm(h*p*(n + 0.5)*dz - ph)*dz);

      smat(0) = IdentityMatrix(4);

      smat(n_) := exm(n - 1).smat(n - 1);

      smat(Nsrem).MatrixPower(smat(Ns), Np))

      Mm(l0nm_, thdeg_, phdeg_) := Bm(p*L).Mp(l0*10^-9, thdeg*dtr, phdeg*dtr)`

magento2 – Magento URL Rewrite – Extract match string and redirect to new path

I have URL For example

mydomainname/dir1/dir2/dir3/dir4/abc.jpg

I want to redirect dynamically to all matching URL

mydomainname/dir4/abc.jpg //Want extract some part and redirect to reaming part of URL

Basic I want to extract some part of URL and redirect to remains part of URL. This should be dynamically.

graphics3d – Would replacing one side of the Dynamic Clock Box with an image be easy or a complete rewrite?

I’ve been looking at the code and reading other questions. I don’t know where to start. Here is the code from the Wolfram example with the addition of importing and resizing an image in the first two lines. I also changed one of the coords elements to {0.5, 0.5, 0.5}.

pablo = WebImage(
   "https://commons.wikimedia.org/wiki/Category:Pablo_Picasso#/media/
File:Pablo_picasso_1.jpg");
pablo1 = ImageTake(pablo, {101, 500}, {201, 600});

vtc = {{0, 0}, {1, 0}, {1, 1}, {0, 1}};
coords = {{{0, 0, 0}, {0, 1, 0}, {1, 1, 0}, {1, 0, 0}}, {{0.5, 0.5, 
     0.5}, {1, 0, 0}, {1, 0, 1}, {0, 0, 1}}, {{1, 0, 0}, {1, 1, 
     0}, {1, 1, 1}, {1, 0, 1}}, {{1, 1, 0}, {0, 1, 0}, {0, 1, 1}, {1, 
     1, 1}}, {{0, 1, 0}, {0, 0, 0}, {0, 0, 1}, {0, 1, 1}}, {{0, 0, 
     1}, {1, 0, 1}, {1, 1, 1}, {0, 1, 1}}};
DynamicModule({}, 
 Graphics3D({Dynamic(Texture(clock), UpdateInterval -> 1), 
   Polygon(coords, VertexTextureCoordinates -> Table(vtc, {6}))}, 
  Lighting -> "Neutral", Boxed -> False), 
 Initialization :> (clock := 
    Module({hour, min, sec, ht, mt, st}, {hour, min, sec} = 
      Take(DateList(), -3); 
     ht = Pi/2 - 2 (Pi) hour/12 - (2 (Pi)) min/720; 
     mt = Pi/2 - 2 (Pi) min/60; st = Pi/2 - 2 (Pi) Floor(sec)/60; 
     Graphics({Thick, Arrowheads(Large), 
       Arrow({{0, 0}, 0.6 {Cos(ht), Sin(ht)}}), 
       Arrow({{0, 0}, 0.9 {Cos(mt), Sin(mt)}}), PointSize(Large), 
       Table(Point(0.9 {Cos(i), Sin(i)}), {i, 0, 2 Pi, (Pi)/6}), 
       Point({0, 0}), Circle(), Red, 
       Line({{0, 0}, 0.85 {Cos(st), Sin(st)}})}))))