Ask your mod_rewrite and Redirection questions here, and get answers!
by willyfoo » 25 Apr 2008 12:19
Using wordpress I renamed the 'category' to 'blog' and i'm trying to redirect
http://livestudios.sg/category/photocards to
http://livestudios.sg/blog/photocardsbut it doesn't seem to work.. what am I missing?
- Code: Select all
DirectoryIndex index.shtml index.php3 index.html index.htm index.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond ${REQUEST_URI} ^.*/category/.*
RewriteRule ^/category/([A-Za-z0-9]+)$ /blog/$1 [R]
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
-
willyfoo
-
- Posts: 2
- Joined: 25 Apr 2008 11:50
by mod_rewrite » 09 May 2008 23:05
- Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^GET\ /category/(.*)\ HTTP/
RewriteRule .* http://livestudios.sg/blog/%1 [R=301,L]
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
Does that work?
-
mod_rewrite
-
- Posts: 102
- Joined: 30 Oct 2006 19:55
by willyfoo » 10 May 2008 00:48
mod_rewrite wrote:- Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^GET\ /category/(.*)\ HTTP/
RewriteRule .* http://livestudios.sg/blog/%1 [R=301,L]
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
Does that work?
It worked!!! You're a savior!!!!
http://livestudios.sg/category/highlights
-
willyfoo
-
- Posts: 2
- Joined: 25 Apr 2008 11:50
Return to Redirect or Rewrite Questions
Who is online
Users browsing this forum: ALATaiplewType, NQBrunsecessy, ShakhtarrDon, VocrepeAcceby, Zitioutbava