Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Web Hosting for WordPress (http://forum.bytesforall.com/forumdisplay.php?f=13)
-   -   How to redirect complete subfolders? (http://forum.bytesforall.com/showthread.php?t=17432)

Hody Apr 27, 2012 01:03 PM

How to redirect complete subfolders?
 
Hello,

thanx to the help within the community I was able to re-launch my website yesterday in a new design based on Atahualpa - Thumbs Up!

Now I have a problem with 404 posts and sadly was not able to find a working plugin that would handle he problem with one general setting, supporting $S. There is one out there called redirection, but once activated it shuts down all the traffic to my site, seems to be broken.

The probem is that I only need to forward certain subfolders of the old html page.

The syntax of its links were:

Page/Topic/../Uptodate/content.html

Now the URL should be:

Archive/Page/Topic/../Uptodate/content.html

The bold part will always be exactly the same and not interefering with any wordpress permalinks, so I think it should somehow be possible to redirect the paths with some kind of wildcard like $S through wpconfig or htacess.

something like Page/Topic/$S = Archive/Page/Topic/$S

Thank you

juggledad Apr 27, 2012 03:05 PM

you should read up about the .htaccess file and how to specify redirects. But that issue is not for this forum.

Jam Apr 27, 2012 10:15 PM

Probably better that you read up first, but I use 301 redirects often after shifting/rebuilding pages/sites.
I FTP a copy of my .htaccess file to local computer for safe keeping.
Edit a copy and upload to include a simple 301 redirect:

Existing .htaccess should look something like:
Code:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Add a redirect for complete folder:

Code:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
Redirect 301 /oldfolder http://www.yourdomain.com/newfolder


or redirect from an old page to a new page etc
Code:

Redirect 301 /oldpage.html http://www.yourdomain.com/newfolder
If you try this just make sure you have a copy of the original .htaccess file to replace the new one if it makes your website fall over! oh and do a complete backup before you touch anything :)


All times are GMT -6. The time now is 08:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.