php - URL redirects in htaccess -


I have set up an htaccess file and running on a live server. Everything is working fine with it but I have to add some specific URL again. IIS Web Specific redirects were established in the config file. One example:

  & lt; Rule name = "URL re-direct" stopProcessing = "true" & gt; & Lt; Match url = "^ program_consumer (.. (\ CFM) | (\ php) | () +) (?. (\ *) | ()) $" / & Gt; & Lt; Conditions logical group = "matching all" track alps = "wrong" /> & Lt; Action Type = "Redirect" url = "site_programs {R: 7}" /> & Lt; / Rules & gt;  

I have tried hard to translate into MT HTX file I have tried:

  AddDefaultCharset OFF option + FollowSymLinks RewriteEngine on RewriteBase / #extensionless Resolved .php file for php url% {REQUEST_FILENAME} -d RewriteCond% {REQUEST_FILENAME} \ RewriteCond php -. F RewriteRule ^ (. *) $ $ 1.php [L] # again Direct non-file non directory RewriteCond% {REQUEST_FILENAME}! -d RewriteCond% {REQUEST_FILENAME}! -f RewriteRule ^ ([program_consumer]) ((..cfm) | (\ php) | () +) ((\ *) | ()) $ http:?. // {HTTP_HOST} / site_programs $ 1 [L, R = 301]  

Obviously, program_consumer is not a file that exists anywhere in the root document directory, but the site_program exists And extensions have been introduced in the form of a lower PHP file. Any thoughts on what I am missing?

Your regex RewriteRule seems defective and kept before the internal rewrite rule Re: Rewrite / rewrite rule ^ (program_consumer. (? Cfm | php)) $ / site_programs / $ 1 [L, R = 301] on the reverse link reverse engine addDefaultCharset close option:

  , NC, Northeast] rewrite the .php file to # Extensionless php URLRerercRQ% {REQUEST_FILENAME}! -D Revival Code% {REQUEST_FILENAME} \ .PP-F Rewriteum ^ (. +?) /? $ $ 1 Php [L]  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -