Reply
redirect /index.php to /main/
Old 10-15-2009, 01:37 AM redirect /index.php to /main/
freki's Avatar
Super Talker

Posts: 107
Name: Cody
Trades: 0
I know this is a simple thing, I've been away from playing with websites so long I've forgotten. I have a website somesite.org (no it's not real) that I would like to have the somesite.org/main/. Tips?

BTW somesite.org/main is a wp install.
__________________
Get to know the real me - CodyStaub.com
freki is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 10-15-2009, 03:49 AM Re: redirect /index.php to /main/
tripy's Avatar
Do not try this at home!

Posts: 3,176
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Put this at the top of index.php:
PHP Code:
<?php
header
"HTTP/1.1 301 Moved Permanently" ); 
header('location:/main/');
exit();
?>
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is online now
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 10-16-2009, 10:44 AM Re: redirect /index.php to /main/
Extreme Talker

Posts: 172
Trades: 0
Do you want to redirect just index page or ALL subpages as well?
__________________
Daniel, Helpdesk Leader
Hosting24.com Web Hosting - First class web hosting services.
Reseller Hosting - Provide unlimited disk space and bandwidth!
Hosting24 is offline
Reply With Quote
View Public Profile
 
Old 10-16-2009, 07:27 PM Re: redirect /index.php to /main/
Super Talker

Posts: 128
Name: Jilesh
Trades: 0
Quote:
Originally Posted by freki View Post
I know this is a simple thing, I've been away from playing with websites so long I've forgotten. I have a website somesite.org (no it's not real) that I would like to have the somesite.org/main/. Tips?

BTW somesite.org/main is a wp install.
If your domain is hosted on Windows Server then you can directly set the redirection from the IIS. However, if your domain is hosted on Linux server then you will have to write the rewrite rule for redirection in your .htaccess file.
__________________
AccuWebHosting.Com - Windows Hosting Expert
ASP.NET 3.5 | SQL 2005 Database | US Based Hosting Company | 24 X 7 Support | Daily Backups
| Web Hosting Directory | Jobs Search Engine | Website Hosting
thewebhostingdi is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to redirect /index.php to /main/
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.10816 seconds with 13 queries