Forum Moderators: phranque

Message Too Old, No Replies

using wordpress rewrite

         

icemancast

4:03 pm on Nov 2, 2007 (gmt 0)

10+ Year Member



the htaccess file looks like the following.

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

when i changed settings i wanted directories to read

"web-design" and not "webdesign". it all works good. my only problem is that i have some links on other sites that are linking to "webdesign" so when i changed rewrite that page is no longer found is there a line i can write that will point all webdesign request to web-design folder instead?

jdMorgan

2:05 pm on Nov 3, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's not clear exactly what you are doing here, but the following line will redirect example.com/webdesign/<anything> to example.com/web-design/<anything>

RewriteRule ^webdesign/(.*)$ httep://www.example.com/web-design/$1 [R=301,L]

This rule should be placed ahead of your WP rewrite code in the .htaccess file

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim

icemancast

2:17 pm on Nov 3, 2007 (gmt 0)

10+ Year Member



that worked awesome. thank you.