Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) /directory/$1 [R=301,L]
http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriterule look at “backreferencing”
Related Posts:
- Place static HTML files in path below WordPress page
- htaccess rewrite for author query string when WP is in subfolder
- Remove year and month in URL using .htaccess
- Rewrite rule not working
- .htaccess redirects disappeared after re-saving permalinks
- Protect Upload Folder Files With Ampersand Problem
- Remove File Extension for Page Outside of WordPress
- WordPress URL/Folder ReWrite using Htaccess
- WordPress mod_rewrite is canceling/overwriting my other mod_rewrite rule
- How can i redirect one url to another url using .htaccess or add_rewrite_rule
- Override htacces rule only for specific directory
- mod_rewrite loop, redirecting http to https on certain section of wordpress blog
- blocking access to all post/tag URIs via htaccess
- Site in subfolder – all pages work except home
- htaccess, site and staging in subdirectories
- How to write .htaccess so that https is on for subpages only but not the home page
- How to create a redirect in the .htaccess file, with 2 exceptions
- 404 error Additionally 403 Forbidden error on a URL
- Custom rewrite rule, url returning 404
- mod_rewrite doesn’t work as I want even with JSON API Plugin disabled
- I have a page using a pretty url and a mod_rewrite rule matching it. I expected it to give an error but it’s working. Why?
- disable WordPress 404 for one specific page/folder to receive actual php errors
- .htaccess Non-‘www’ to ‘www’ Subdomain Redirection Only Works for Homepage
- Rewriting subfolders to specific parent folder in WordPress
- Redirect WordPress site to a landing (construction) page using htaccess, with access to /wp-admin and /invoice
- htaccess redirect to path
- I can access subdirectory, but not files within it
- htaccess mod_rewrite not working
- Add-on domain works in WordPress but links still lead to subdomain
- .htaccess – how to force “www.” in a generic way?
- How does RewriteBase work in .htaccess
- Improve wordpress security by hiding non public resources
- htaccess rewrite conflict with wordpress rules and ssl
- Unable to access WP admin
- Move wordpress to folder without changing urls
- Using WordPress only for the backend, and using AngularJS as a frontend
- Two domains on one WordPress Installation
- .htaccess and WordPress Admin Bar
- Menu links only using http after enabling https, unable to redirect http links
- Blocking access to wp-login via htaccess not working
- How to Redirect huge numbers of URLs to another URLs?
- Struggling with add_rewrite_rule
- Giving WordPress its own subdirectory – nginx
- Cannot mask WordPress page URL using .htaccess
- How can I make an htaccess file on a Mac? [closed]
- Rewrite rule to load images from production does nothing
- Restricting user login by IP address
- WordPress overrides custom 404 page with it’s own
- New installation can’t be found due to htaccess of the original non-WordPress site
- Case insensitive header params for API request
- 301 Redirect domain Sub-folders to Subdomain subfolder
- Drawbacks to using Options -Indexes
- Override 404 page with htaccess
- Htaccess Rewrite reverts to default .htaccess file
- what could cause the htaccess file to be modified?
- change permalink structure with htaccess without SEO impact
- How to remove wordpress directory slash
- Can’t upload .htaccess after editing in notepad
- Directing subdomain to main domain and keeping the subdomain format with .htaccess
- Remove /sites/25/ from image URLS
- How disable canonical redirect wp-signup
- Forcing HTTPS with WordPress on AWS
- WordPress Example Code for Blocking Referrer Spam
- How could a .htaccess with authentication suddenly appear or change?
- Force non-ssl on WordPress RSS feeds in htaccess, using cloudflare
- Protect wp-login, but get an internal server error
- Local wordpress install only shows home page, all other pages Not Found
- WordPress is rewrite my htacces file. I adding a font rule
- Redirect within wordpress template/plugin
- Redirect wrong links WordPress
- Accepting special characters in querystring
- Centos 7.2 wordpress on going to /admin shows Forbidden You don’t have permission to access /wordpress/wp-admin/ on this server
- Multiple wordpress installations on same server
- Cannot access subdirectory subpages
- WordPress constantly running out of memory
- mod-rewrite rules grabs “broken permalinks”, too
- Configure .htaccess to have a WordPress single site installation with all subdomains pointing to the same pages?
- Azure WordPress deny access to xmlrpc
- Understanding Redirects
- domain redirection is not working from old to new
- Deny,Allow on .htaccess isn’t working
- Using htaccess to prevent spam through wp-comments-post.php
- Install second wordpress in root subfolder, Error 404
- Pretty URL via Rewrite
- URL Rewrite 404
- Remove subdirectory from links
- modifying htaccess for localhost with a custom port
- .htaccess redirects for posts in new directory and new domain
- domain.in/wp-admin give the result to 403 Access to this resource on the server is denied!
- htaccess and redirect to new url using regex
- ModRewrite not working properly
- Restrict Content for only Contributors via .htaccess
- Redirect from domain.com to subdomain.domain.com
- customize urls displayed by previous_post_link and next_post_link
- MAMP.app & .htaccess – Can’t override after config
- register_post_type and register taxonomy and htaccess
- Why ‘Authorization Required’ is coming on wordpress login
- Restricting direct downloads of wp content files, but allow them on the website.
- Forward blog requests to another URL
- .htaccess rewrite rule stopped working for wordpress site after moving server