Forum Moderators: phranque
Here is my current .htaccess file
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.*)$ [domain.com...] [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(([^/]+/)*)index\.html\ HTTP/
RewriteRule index\.html$ [domain.com...] [R=301,L]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /BWP/
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule . /BWP/ [L]
</IfModule>
Lines 1 through 5 were written by experts here at WebmasterWorld.
Lines 6 through 12 were written by Word Press to make my URL's pretty.
domain/BWP/ is where my word press url's are
For SEO purposes, I want all three of the below:
[domain.com...]
[domain.com...]
[domain.com...]
to 301 redirect to
www.domain.com/BWP/
What additions do I need to my old .htaccess
Due to my comeplete ignorance in this area, could you please write the final entire new .htaccess file in your reply.
If anyone sees any SEO reasons why this would be a bad idea please tell me.
Your help is most apreciated!
dk
This request does not comport with our Apache Forum Charter, and I ask that you please review it here [webmasterworld.com] before we continue down this path. Thanks.
You can simply add the following at line 3:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /BWP/index\.php\ HTTP/
RewriteRule ^BWP/index\.php$ http://www.example.com/BWP/ [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /BWP/index\.php\ HTTP/
RewriteRule ^BWP/index\.php$ http://www.example.com/BWP/ [R=301,L]
#
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(([^/]+/)*)index\.html\ HTTP/
RewriteRule index\.html$ http://www.example.com/%1 [R=301,L]
#
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
Jim
Jim