How to redirect all pages in a subfolder to a single page
I recently changed my site's directory structure and also started using php to generate file names. All of my previous files have been renamed so that they can be easily accessed via the mysql/php. Site works fine. Problem is existing links on external sites point to the old directory/file, e.g., <site>/library_wheels/wheel-1-name.html <site>/library_wheels/wheel-2-name.html <site>/library_wheels/wheel-3-name.html I want any request to any html file in the old library_wheels directory (which no longer exists) to go to a general index page: <site>/library_wheels.php. There the visitor can look up the right link. Or should I put in nearly a thousand 301 redirects in the .htacess file? Thanks Mar 22: tried #Marc B's answer; doesn't work. June 14, 2015: tisantisan's answer worked, but I had to specify the full url of the destination page: RewriteRule ^http://www.bps.lk/library_wheels.php [R=301,L,NC] Or else, #Marc B's answer worked, but I must have typed it in wrong!
This works for me: Options +FollowSymLinks RewriteEngine On RewriteRule ^library_wheels/ library_wheels.php [R=301,L,NC]
Redirect https://domain.com to https://www.domain.com in Godaddy
How do I use redirections and the Google search console?
OPENWRT : Redirect all wireless client's http/https traffic to the local webserver?
HAProxy redirect to subdomain
Gtmetrix Mimimize Redirect Chains
outlook calendar api redirection uri with vhost , not working
Redirect address when IP and port are mapped to domain
Masking an URL after redirect
How to redirect without change url?
.Search bar not storing history correctly on redirect from separate search page
301 redirect index.html to index.php and hide index.php from the url
Check redirect rules from .htaccess file
301 Redirect with limited access to site
How to create a custom expression to 301 redirect multiple html pages to a single page
URL Rewrite Module and Folder Redirects
handling URI redirect response in OAuth2 user agent flow