![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 |
|
Regular Coder ![]() Join Date: Apr 2008
Location: Missouri
Posts: 380
Thanks: 38
Thanked 45 Times in 43 Posts
![]() |
[RESOLVED]Do I need a rewrite?
Hey Everyone,
I come to you with what I think is a reason to use .htaccess or some kind of rewrite. I admit upfront that my knowledge on this topic is limited. Here's what I got: I'll be moving a clients entire website and blog system to a different location on his server. Right now he has blog posts like so: Code:
http://www.clientssite.com/blog/2009/10/26/r-i-p-geocities/ Code:
http://www.clientssite.com/2009/10/26/r-i-p-geocities/ I would appreciate any tips or links that could help me out. -Drew
__________________
Last edited by FWDrew; 11-02-2009 at 07:03 AM.. |
|
|
|
|
|
PM User | #2 | ||
|
Master Coder ![]() Join Date: Mar 2007
Location: God's own country
Posts: 8,976
Thanks: 142
Thanked 1,192 Times in 1,184 Posts
![]() ![]() ![]() ![]() |
Have a try by adding a rule in your .htaccess file like
Code:
RewriteRule ^blog/(.*)$ http://%{HTTP_HOST}/$1 [R=301,L]
Edit:
Quote:
__________________
Quote:
|
||
|
|
|
| Users who have thanked abduraooft for this post: | FWDrew (11-01-2009) |
|
|
PM User | #3 | |
|
Regular Coder ![]() Join Date: Apr 2008
Location: Missouri
Posts: 380
Thanks: 38
Thanked 45 Times in 43 Posts
![]() |
Quote:
![]() Yes it is WordPress, I already had the idea of changing the permalinks to contains blog, but this will cause problems with other blog posts, with the way I have the client taking advantage of posts. Basically, changing the permalinks to include blog isn't an option. I'll try this soon and get back to you, thanks again.
__________________
|
|
|
|
|
|
|
PM User | #4 |
|
Regular Coder ![]() Join Date: Apr 2008
Location: Missouri
Posts: 380
Thanks: 38
Thanked 45 Times in 43 Posts
![]() |
Hey abduraooft,
That worked wonderfully thanks. However, I come to you in need of another rewrite help. I have a URL like so: http://blog.clientsites.com/files/geocities.jpg Which I would like to redirect to: http://clientsites.com/files/geocities.jpg Any idea or pointers on how to go about doing this? EDIT - Nevermind, I figured everything out. I just put an .htacess file in the blog.clientssites.com folder and redirected where I needed to. Thanks again!
__________________
Last edited by FWDrew; 11-02-2009 at 07:01 AM.. |
|
|
|
|
|
PM User | #5 | |
|
Senior Coder ![]() ![]() Join Date: Dec 2007
Posts: 4,658
Thanks: 374
Thanked 562 Times in 551 Posts
![]() ![]() |
Quote:
), so all you need is to add a subdomain and put wordpress there.And also it can have any subdomain name you want, blog is just a name, ![]() best regards |
|
|
|
|
| Users who have thanked oesxyl for this post: | FWDrew (11-02-2009) |
|
|
PM User | #6 | |
|
Regular Coder ![]() Join Date: Apr 2008
Location: Missouri
Posts: 380
Thanks: 38
Thanked 45 Times in 43 Posts
![]() |
Quote:
![]() It's really a complicated project and thing to explain (I have trouble describing it all in type), but it's all figured out now, I didn't need to use a rewrite for the second example.
__________________
|
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|