![]() |
.htaccess and 301 Redirect
Hi
I try to do some redirection, I want to redirect all blog post from my sub-domain ( but not from main sub-domain page) to my domain category page. sub.domain.com/all-post/ to domain.com/category/ (or even better to domain.com/category/random-post/ - but I don't believe that is possible... ) And I want to keep the main page of my sub-domain. Thanks! |
did you try this www htaccessredirect dot net
|
I do not get what I need...
|
Following is the basic redirection. However, looks like you need multiple filtration which should not be impossible...
Code:
RewriteEngine on You will need one adddition line like RewriteCond %{REQUEST_URI} before rewrite rule. |
If u want to redirect to random post u need to use php or any other lang ur using.
|
Code:
301 Redirect Entire Directory ^ try out in that sub domain's .htaccess Code:
RedirectMatch 301 /all-post(.*) http://domain.com/category/$1 http://www.askapache.com/htaccess/htaccess.html if the above won't work read the code posts here. |
I buy on fiverr for 5$ this htaccess code, and it is working for me:
Code:
RewriteCond %{HTTP_HOST} ^boobs\.domain\.c o m [NC] |
Quote:
i knew about REQUEST_URI but couldn't figure it out. lol thanks for sharing with us! it might save 5 bucks for many. |
All times are GMT -7. The time now is 03:26 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc