Bravo List
Register
Go Back   > Bravo List > P2P > Forum > Tutorials
Reply
  #1  
Old 21-12-10, 19:36
daffy's Avatar
daffy daffy is offline
Stoned Staff
 
Join Date: Mar 2009
United Kingdom
Posts: 548
Default Force users to another page not index
ok some ppl wonderd how to force users when coming to site, to view a page not index.php


heres how i done it.

creat a blank index.html and place into root

add this to your .htaccess or create .htaccess and place this inside

Code:
DirectoryIndex name_of_file.php
Redirect 301 /currentLocation http://sitename.com/name_of_file.php
enter the page name you want users to go to when coming to your site.
no instead of users gettin index.php they will get login.php or forums.php or signup.php whatever you want first page view to be. hope this helps
Attached Files
File Type: rar htaccess.rar (166 Bytes, 31 views)
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


Click the image to open in full size.

I also Setup And Modify Trackers PM For Details
Reply With Quote
  #2  
Old 21-12-10, 20:08
draconian's Avatar
draconian draconian is offline
Senior Member
 
Join Date: Jun 2010
P2P
Posts: 39
Default
Is this how its suppose to look?

Code:
DirectoryIndex index.php
Redirect 301 /currentLocation http://mysitename/login.php
Options +FollowSymLinks
RewriteEngine On

<Files .htaccess>
    order allow,deny
    deny from all
</Files>

ErrorDocument 400 /ts_error.php?errorid=400
ErrorDocument 401 /ts_error.php?errorid=401
ErrorDocument 403 /ts_error.php?errorid=403
ErrorDocument 404 /ts_error.php?errorid=404
ErrorDocument 500 /ts_error.php?errorid=500

# //seo_mod_start
# Uncomment the following and add your tracker path if rewrites arent working properly
#RewriteBase /
RewriteRule ^index.html$ index.php [L,NE]
RewriteRule ^(.*)-b-([0-9]+).ts(.*)$ browse.php?cat=$2 [QSA,L]
RewriteRule ^(.*)-c-([0-9]+).ts(.*)$ browse.php?browse_categories&category=$2 [QSA,L]
RewriteRule ^(.*)-d-([0-9]+).ts(.*)$ download.php?id=$2 [QSA,L]
RewriteRule ^(.*)-s-([0-9]+).ts(.*)$ details.php?id=$2 [QSA,L]
RewriteRule ^(.*)-a-(.*).ts(.*)$ announce.php?passkey=$2 [QSA,L]
RewriteRule ^(.*)-u?([0-9]+).ts(.*)$ userdetails.php?id=$2$3 [QSA,L]
RewriteRule ^(.*)-f([0-9]+).tsf(.*)$ tsf_forums/index.php?fid=$2$3 [QSA,L]
RewriteRule ^(.*)-fd([0-9]+).tsf(.*)$ tsf_forums/forumdisplay.php?fid=$2$3 [QSA,L]
RewriteRule ^(.*)-t([0-9]+).tsf(.*)$ tsf_forums/showthread.php?tid=$2$3 [QSA,L]
# //seo_mod_end

<IfModule mod_expires>
    <FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?)$">
        ExpiresActive On
        ExpiresDefault "access plus 10 years"
    </FilesMatch>
</IfModule>

<IfModule mod_headers>
  Header unset Last-Modified
</IfModule>

FileETag none
php_flag short_open_tag on
php_flag register_globals off
Reply With Quote
  #3  
Old 21-12-10, 20:14
daffy's Avatar
daffy daffy is offline
Stoned Staff
 
Join Date: Mar 2009
United Kingdom
Posts: 548
Default
DirectoryIndex index.php

should be

DirectoryIndex login.php
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


Click the image to open in full size.

I also Setup And Modify Trackers PM For Details
Reply With Quote
  #4  
Old 21-12-10, 20:19
draconian's Avatar
draconian draconian is offline
Senior Member
 
Join Date: Jun 2010
P2P
Posts: 39
Default
Quote:
Originally Posted by daffy View Post
DirectoryIndex index.php

should be

DirectoryIndex login.php
ok edited that but it still isnt redirecting. hmm.

Code:
DirectoryIndex login.php
Redirect 301 /currentLocation http://mytracker.com/login.php
Options +FollowSymLinks
RewriteEngine On

<Files .htaccess>
    order allow,deny
    deny from all
</Files>

ErrorDocument 400 /ts_error.php?errorid=400
ErrorDocument 401 /ts_error.php?errorid=401
ErrorDocument 403 /ts_error.php?errorid=403
ErrorDocument 404 /ts_error.php?errorid=404
ErrorDocument 500 /ts_error.php?errorid=500

# //seo_mod_start
# Uncomment the following and add your tracker path if rewrites arent working properly
#RewriteBase /
RewriteRule ^index.html$ index.php [L,NE]
RewriteRule ^(.*)-b-([0-9]+).ts(.*)$ browse.php?cat=$2 [QSA,L]
RewriteRule ^(.*)-c-([0-9]+).ts(.*)$ browse.php?browse_categories&category=$2 [QSA,L]
RewriteRule ^(.*)-d-([0-9]+).ts(.*)$ download.php?id=$2 [QSA,L]
RewriteRule ^(.*)-s-([0-9]+).ts(.*)$ details.php?id=$2 [QSA,L]
RewriteRule ^(.*)-a-(.*).ts(.*)$ announce.php?passkey=$2 [QSA,L]
RewriteRule ^(.*)-u?([0-9]+).ts(.*)$ userdetails.php?id=$2$3 [QSA,L]
RewriteRule ^(.*)-f([0-9]+).tsf(.*)$ tsf_forums/index.php?fid=$2$3 [QSA,L]
RewriteRule ^(.*)-fd([0-9]+).tsf(.*)$ tsf_forums/forumdisplay.php?fid=$2$3 [QSA,L]
RewriteRule ^(.*)-t([0-9]+).tsf(.*)$ tsf_forums/showthread.php?tid=$2$3 [QSA,L]
# //seo_mod_end

<IfModule mod_expires>
    <FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?)$">
        ExpiresActive On
        ExpiresDefault "access plus 10 years"
    </FilesMatch>
</IfModule>

<IfModule mod_headers>
  Header unset Last-Modified
</IfModule>

FileETag none
php_flag short_open_tag on
php_flag register_globals off
Reply With Quote
  #5  
Old 21-12-10, 20:21
daffy's Avatar
daffy daffy is offline
Stoned Staff
 
Join Date: Mar 2009
United Kingdom
Posts: 548
Default
thats correct, clear your cache from browser and reload browser. it works for me anyway.
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


Click the image to open in full size.

I also Setup And Modify Trackers PM For Details
Reply With Quote
  #6  
Old 21-12-10, 20:34
draconian's Avatar
draconian draconian is offline
Senior Member
 
Join Date: Jun 2010
P2P
Posts: 39
Default
omg now this is really wierd, i tried the .htaccess on the test site hosted locally and it worked but it isnt working with the site hosted on my linux server!

alright checked the apache logs and it was some kinda directive error so this is what i changed and it works.

anyone who has problem getting it to work, try this:

Code:
1) check that /etc/http/conf/httpd.conf "Allowoverride is set to "All"

Eg: AllowOverride All

2) open /etc/httpd/conf.d/welcome.conf

locate "Options -Indexes"

replace with "Options Indexes"
&& thanks daffy :)

Last edited by draconian; 21-12-10 at 21:48.
Reply With Quote
Reply

Tags
force , index , page , users

Thread Tools

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

Forum Jump



All times are GMT +2. The time now is 09:14. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2018, vBulletin Solutions Inc.