Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 24th Sep 2010, 10:05 PM   #1
Warrior Member
 
Join Date: 2009
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default
.htaccess rewrite help
Share on: 
fb share twitter share gplus share more share

So here is my situation.

I just upgraded vbulleten to the new vb with CMS. Now my old cms doesn't work, and I don't want it to, but the problem is that people used to be able to go to exmaple.com, and the cms gave them options to go to the forum or other pages.

Now the built in CMS is in the /forums directory, and people are used to going to the root domain.

So i need to forward all people from example.com to example.com/forums for things to work, but then I loose PR on my original page, so I want to rewrite /forums to the root

So when you access the site you see the forums in /forums but the url remains as example.com

If anyone can help that would be great......Thanks

Need Proxies? Have you tried ProxyNexus Free 3 Day Trial. Fresh proxies every hour.

rednimer is offline  
Unread 25th Sep 2010, 06:15 AM   #2
Active Warrior
 
Join Date: 2010
Posts: 61
Thanks: 2
Thanked 3 Times in 3 Posts
Default
Re: .htaccess rewrite help
Share on: 
fb share twitter share gplus share more share

You shouldn't lose your PR if you use a 301 (permanent) redirect AFAIK.

redirect 301 old_url.html newurl.com

As for your other question...

If you want to rewrite a URL to another but keep the old URL in the location bar use this..

Code:
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteRule ^cms.php /forum/cms.php
The "Options +FollowSymlinks" is optional & basically just tells it to follow symlinks... you probably don't need to worry about that so you can leave it out.

The "RewriteBase /" controls where you are rewriting from..... basically it's like appending whatever you put there to the URL you are rewriting..... so for example:

RewriteBase /

...becomes..

RewriteRule ^/cms.php /forum/cms.php

OR

RewriteBase /123/

...becomes..

RewriteRule ^/123/cms.php /forum/cms.php

Let me know if that works for you!
cyphix is offline  
Unread 25th Sep 2010, 02:08 PM   #3
Warrior Member
 
Join Date: 2009
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: .htaccess rewrite help
Share on: 
fb share twitter share gplus share more share

Thanks for the info....

I found a different solution so I wasn't able to test this though.

Apparently vbulletin was already prepared for this, and allows you to move the index.php to the root directory, and just make a small change in the file to point to your forum.

Need Proxies? Have you tried ProxyNexus Free 3 Day Trial. Fresh proxies every hour.

rednimer is offline  
Unread 25th Sep 2010, 02:11 PM   #4
Active Warrior
 
Join Date: 2010
Posts: 61
Thanks: 2
Thanked 3 Times in 3 Posts
Default
Re: .htaccess rewrite help
Share on: 
fb share twitter share gplus share more share

OK great - good to hear you got it sorted out anyway!
cyphix is offline  
Closed Thread


Bookmarks

Tags
htaccess, rewrite


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 05:14 PM.