RedirectMatch uses a regular expression that is matched against the URL path. And your regular expression
/contact.php just means any URL path that contains
/contact.php but not just any URL path that is exactly
/contact.php. So use the anchors for the start and end of the string (
RedirectMatch 301 ^/contact\.php$ /contact-us.php
- need to set wordpress to root domain
- URL rewriting with PHP
- CodeIgniter removing index.php from url
- Using .htaccess to make all .html pages to run as .php files?
- Create subdomains on the fly with .htaccess (PHP)
- Laravel 5 – Remove Public from URL
- Force SSL/https using .htaccess and mod_rewrite
- How can I create friendly URLs with .htaccess?
- How to load classes based on pretty URLs in MVC-like page?
- How to hide config files from direct access?
- deny direct access to a folder and file by htaccess
- Server not parsing .html as PHP
- Seo Friendly URL results in CSS IMG and JS not working
- Htaccess: add/remove trailing slash from URL
- How Can I Remove “public/index.php” in the URL Generated Laravel?
- HTTP authentication logout via PHP
- How to check whether mod_rewrite is enable on server?
- Remove index.php From URL – Codeigniter 2
- URL rewriting : css, js, and images not loading
- .htaccess rewrite GET variables
- Is it possible to redirect post data?
- Pretty URLs with .htaccess
- Yii2 htaccess – How to hide frontend/web and backend/web COMPLETELY
- Deny direct access to all .php files except index.php
- how to redirect domain according to country IP address
- how to change php version in htaccess in server
- Remove .php extension (explicitly written) for friendly URL [closed]
- .htaccess issues: No input file specified
- No input file specified
- How to hide .php extension in .htaccess [duplicate]
- CodeIgniter htaccess and URL rewrite issues
- Enabling error display in PHP via htaccess only
- How can I use .htaccess to hide .php URL extensions?
- .htaccess RewriteRule to preserve GET URL parameters
- Getting a 500 Internal Server Error (require() failed opening required path) on Laravel 5+ Ubuntu 14.04
- Increase max execution time for php
- Using PHP/Apache to restrict access to static files (html, css, img, etc)
- Generate SEO friendly URLs (slugs) [closed]
- Request Entity Too Large PHP
- laravel trailing Slashes redirect to localhost
- .htaccess for cakephp
- How to remove /public/ from a Laravel URL
- Secure files for download
- How To Detect An Incoming Request (With PHP Script) From a CNAME Subdomain?
- Directory index forbidden by Options directive
- Changing the root folder via .htaccess
- PHP: How can I block direct URL access to a file, but still allow it to be downloaded by logged in users?
- Deny ajax file access using htaccess
- mod_rewrite, php and the .htaccess file
- How Can I Remove “public/index.php” in the Laravel Url generated? [duplicate]