0

I'm working on a WordPress site where the WordPress install is in a subdirectory. So, of course, I want to redirect most page requests into that subdirectory. That task is accomplished. The problem is in the exceptions. There is one other WordPress install that is used sporatically in its own subdirectory. And there are two sections with straight PHP coding in their own directories. The way I currently have the .htaccess, it is sending everything into the main WordPress install, and it doesn't seem possible to load the exceptions.

I have done a temporary fix by linking to the web host's temporary address, but that is a pretty clunky solution. I'm thinking that possibly I need to put the exceptions above the main redirect, but it seems odd to redirect something to itself.

Here is my current code. Please note that I have changed the directory names for the client's privacy.

# Redirect site into WordPress folder
RewriteCond %{REQUEST_URI} !^/WordPress/
# Rewrites all URLS [Replace "domain" with the actual domain, without the TLD (.com, .net, .biz, etc)]
RewriteCond %{HTTP_HOST} ^(www\.)?clientdomain\.
# Rewrite all those to insert /folder
RewriteRule ^(.*)$ /WordPress/$1 [L] 
  • look here http://stackoverflow.com/questions/1945568/htaccess-redirect-all-pages-to-new-domain – Eugen Aug 08 '15 at 21:53
  • Yes, that is done - the main redirect to the new address. It is the exceptions that I don't know how to make work. I hope that I have made my original question clear in this regard. – Nora McDougall-Collins Aug 10 '15 at 21:17

1 Answers1

0

This Work Is Not Possible in .htaccess File You Can Go into Your Wordpress Installation Folder and Find wp-config.php Find Your Database Name Than Go To PhpMyAdmin Select Your Database And Find URL ANd Change It ......

  • This step is already done for the main WordPress site. The updates to the internal WordPress addressing are in the database. But, that is a WordPress issue. This is a related, but different question for other items at the root level. How to I provide 3 exceptions to the redirect into the subdirectory that holds Wordpress. – Nora McDougall-Collins Aug 10 '15 at 21:19