|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Dealing with apache redirectsI've just replaced an existing website with a WordPress based one,
moving much of the content from static HTML pages into WordPress pages. There's still to map some of the old URLs to new WordPress pages, or to handle the 404 a little more gracefully. So I currently have http://bar.com/foo/ and the old site moved to http://bar.com/foo/archive My .htaccess reads <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /services/csirt/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /foo/index.php [L] </IfModule> So for instance I'd like a request for the old http://bar.com/foo/index.html to get redirected to http://bar.com/foo/index.php rather than getting a WordPress 404 as I currently do. How should the .htaccess be adjusted to cope with this? I did think that adding at the top Redirect /foo/index.html http://www.bar.com/foo/ Would do the trick but this appears to send me into a redirection loop. :( Any thoughts? James _______________________________________________ wp-hackers mailing list wp-hackers@... http://lists.automattic.com/mailman/listinfo/wp-hackers |
|
|
Re: Dealing with apache redirectsIs this in .htaccess?
DirectoryIndex index.php you can't redirect /foo/index.html to /foo/ On Thu, Oct 29, 2009 at 11:59 AM, James Davis <james@...>wrote: > I've just replaced an existing website with a WordPress based one, > moving much of the content from static HTML pages into WordPress pages. > > There's still to map some of the old URLs to new WordPress pages, or to > handle the 404 a little more gracefully. So I currently have > http://bar.com/foo/ and the old site moved to http://bar.com/foo/archive > > My .htaccess reads > > <IfModule mod_rewrite.c> > RewriteEngine On > RewriteBase /services/csirt/ > RewriteCond %{REQUEST_FILENAME} !-f > RewriteCond %{REQUEST_FILENAME} !-d > RewriteRule . /foo/index.php [L] > </IfModule> > > So for instance I'd like a request for the old > > http://bar.com/foo/index.html to get redirected to > http://bar.com/foo/index.php rather than getting a WordPress 404 as I > currently do. How should the .htaccess be adjusted to cope with this? I > did think that adding at the top > > Redirect /foo/index.html http://www.bar.com/foo/ > > Would do the trick but this appears to send me into a redirection loop. :( > > Any thoughts? > > James > _______________________________________________ > wp-hackers mailing list > wp-hackers@... > http://lists.automattic.com/mailman/listinfo/wp-hackers > wp-hackers mailing list wp-hackers@... http://lists.automattic.com/mailman/listinfo/wp-hackers |
|
|
Re: Dealing with apache redirectsmccormicky wrote:
> Is this in .htaccess? > DirectoryIndex index.php > > you can't redirect /foo/index.html > to /foo/ Thanks, that'd make sense and I thought it might be something to do with options for default indexes :) I'm currently looking at a few plugins so that might make things easier for colleagues who aren't as comfortable with .htaccess files as I'm not ;) James _______________________________________________ wp-hackers mailing list wp-hackers@... http://lists.automattic.com/mailman/listinfo/wp-hackers |
|
|
Re: Dealing with apache redirectsOn Thu, Oct 29, 2009 at 10:59 AM, James Davis <james@...> wrote:
> Any thoughts? > > James Sure. Forget .htaccess. Use this WordPress plugin. http://wordpress.org/extend/plugins/redirection Really, really handy plugin. It lets you create easy redirection rulesets, keeps track of 404s to know what you have not redirected yet, etc. Very useful, way better than manually dealing with .htaccess rules. -Otto _______________________________________________ wp-hackers mailing list wp-hackers@... http://lists.automattic.com/mailman/listinfo/wp-hackers |
| Free embeddable forum powered by Nabble | Forum Help |