Redirect is supposed to redirect all URLs starting with the string. Since the URL you redirect to started with that string, naturally you instantly redirected again.
RedirectMatch redirects URLs that match a regular expression. You used $ to explicitly match the end of the URL as part of that. That means that “starting with” is not enough.
Related Posts:
- Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04
- How to remove index.php from WordPress site URL
- How do I make a redirect in PHP?
- How to avoid Request Entity Too Large 413 error
- http://localhost:80 is not working on running Apache server through UniServer ZeroXIII
- How do I resolve a HTTP 414 “Request URI too long” error?
- Getting an error when I visit http://localhost
- What is the difference between the ‘www’ folder and ‘htdocs’ folder?
- What is Options +FollowSymLinks?
- SSL error SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
- MAMP “Apache couldn’t be started because port is in use.” AND “Can’t connect to local MySQL server through /tmp/mysql.sock
- Only variable references should be returned by reference – Codeigniter
- Connection reset by peer: mod_fcgid: error reading data from FastCGI server
- file_get_contents( ) not working
- XAMPP, using port:81, cannot run localhost:81/mywebsite
- “End of script output before headers” in Apache + PHP
- How can I force users to access my page over HTTPS instead of HTTP?
- Using PHP 7 with WAMP
- Redirect old php link to wordpress link in .htaccess
- Redirect old php link to wordpress link in .htaccess
- Cant login to wp-admin (redirecting to homepage), But CAN login to wp-login.php
- Cant login to wp-admin (redirecting to homepage), But CAN login to wp-login.php
- WordPress multisite causing Error 101 (net::ERR_CONNECTION_RESET): Unknown error [duplicate]
- Apache Fallback instead of add_rewrite_rule
- how to combine wordpress htaccess on my root domain + php on subfolder
- Rewrite /keyword1+keyword2.html to search page | .htaccess
- NGINX rewrite rules for WordPress Subdirectory Multisite to support deep URL
- How to set 777 permission on a particular folder? [closed]
- PHP page redirect
- How do I redirect a page in jQuery?
- Fatal error: Call to undefined function mysqli_connect()
- What’s the purpose of ini_set() in php? (especially for error reporting)
- Send email with PHP from html form on submit with the same script
- HTML Element Array, name=”something[]” or name=”something”?
- Why use $_SERVER[‘PHP_SELF’] instead of “”
- Setting up a PHP interpreter in PhpStorm
- PHP: $_SERVER variables: $_SERVER[‘HTTP_HOST’] vs $_SERVER[‘SERVER_NAME’]
- Illegal string offset Warning PHP
- Fatal error: Call to undefined function mysqli_connect()
- Could not open input file: artisan
- What’s the use of ob_start() in php?
- PHP: variables in strings without concatenation
- PHP mail not working for some reason
- Get Root Directory Path of a PHP project
- Returning JSON from PHP to JavaScript?
- Can’t use method return value in write context
- PHP get domain name
- How to solve “Fatal error: Class ‘MySQLi’ not found”?
- Running a Python script from PHP
- Object of class DateTime could not be converted to string
- HTTP Error 411, The request must be chunked or have a content length
- mysqli::query(): Couldn’t fetch mysqli
- Fatal error: Call to undefined function sqlsrv_connect()
- Html encode in PHP
- file_put_contents: Failed to open stream, no such file or directory
- PHP $_POST not working?
- PHP cURL HTTP PUT
- Convert timestamp to readable date/time PHP
- PHP sessions that have already been started
- Contact Form 7 – Custom Validation
- How to output JavaScript with PHP
- WRONGTYPE Operation against a key holding the wrong kind of value php
- What is the advantage of using try {} catch {} versus if {} else {}
- Laravel – Model Class not found
- Fatal error: Call to a member function fetch_assoc() on a non-object
- Strict Standards: Only variables should be assigned by reference PHP 5.4
- mysqlworkbench giving version error on exporting database
- Steam Market API?
- PHP array delete by value (not key)
- PHP mail: Multiple recipients?
- Having a problem getting mysqli_query to execute
- Session variables not working php
- Get JSON object from URL
- How to push both value and key into PHP array
- Find the last element of an array while using a foreach loop in PHP
- Popup window in PHP?
- How can you use php in a javascript function
- How to bypass (deprecated) reCAPTCHA V1?
- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ””)’ at line 2
- WordPress- url for localhost wp-admin is not working
- How to run multiple Async HTTP requests in WordPress?
- WP CLI info showing correct PHP binary but wrong version of PHP
- Which ways can be used to log in to WordPress?
- How do I test to ensure that my wp-config file is protected?
- .htaccess Security Header Rules
- .htaccess in subdir gets ignored by WordPress’ own .htaccess in /
- WordPress admin dashboard missing icons
- admin-ajax.php warning max input vars exceeded on layered pop plugins [closed]
- Does WP suppresses .htaccess if permalinks are disabled?
- Access sub-domain when root public_html is protected with .htaccess password
- Check against server time to display SQL entries – Radio Station DJ Rotator Plugin
- Problem with data collection in tables
- Pages from admin dasboard missing after site migration
- Huge time to first byte on live site
- 301 redirect from webpage to wordpress page in the same root
- Having an HTTP error 500 after migrating a website
- Can I redirect the http request towards an old folder to the homepage using .htaccess file? [closed]
- session_start(): Cannot find save handler ‘mm’ – session startup failed in /sites
- How to add global CSS to all webpages without installing any plugin?