Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Redirect index.php to root with no .htaccess file
Old 07-28-2009, 07:57 PM Post Redirect index.php to root with no .htaccess file
Junior Talker

Posts: 2
Trades: 0
My website's sftp server currently doesn't feature an .htaccess file. I have tried to add one so that when I type in the root URL, it doesn't automatically redirect to "index.php." Yet I always get a 500 error when this occurs, which leads me to believe either there is something wrong with the server or I am not creating a proper .htaccess file. Help?
tynansanger is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-28-2009, 08:05 PM Re: Redirect index.php to root with no .htaccess file
vangogh's Avatar
Post Impressionist

Posts: 10,689
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Could you post a link to your site and the code you're using in your .htacess file?
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 07-28-2009, 09:16 PM Re: Redirect index.php to root with no .htaccess file
Junior Talker

Posts: 2
Trades: 0
The website is http://www.cmp.jobs/ (redirects to http://www.cmp.jobs/index.php)

I tried adding this code in the .htaccess file I created:
Options +FollowSymLinks
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.cmp.jobs/$1 [R=301,L]
tynansanger is offline
Reply With Quote
View Public Profile
 
Old 07-30-2009, 09:50 PM Re: Redirect index.php to root with no .htaccess file
vangogh's Avatar
Post Impressionist

Posts: 10,689
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
You could make it simpler try

Options +FollowSymLinks
RewriteEngine on
redirect 301 /index.php http://www.cmp.jobs/
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Reply     « Reply to Redirect index.php to root with no .htaccess file
 

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.17291 seconds with 12 queries