|
#1
|
||||
|
||||
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 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
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?" "I Kill You!" simples
|
#2
|
|||
|
|||
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 |
#3
|
||||
|
||||
DirectoryIndex index.php
should be DirectoryIndex login.php
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?" "I Kill You!" simples
|
#4
|
|||
|
|||
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 |
#5
|
||||
|
||||
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
|
#6
|
|||
|
|||
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" Last edited by draconian; 21st December 2010 at 21:48. |
Tags |
force , index , page , users |
|
|