.htaccess Problem

payments1975

New Member
YetiShare User
Dec 2, 2012
1
0
0
Hello,

If I place the following .htaccess code, I'm unable to access the admin area http://domain.com/admin/ It redirects me back to the main page.

Code:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.+)\~s$
RewriteRule ^(.*) stats.php?u=$1 [L]
RewriteCond %{REQUEST_URI} ^(.+)\~d$
RewriteRule ^(.*) delete_file.php?u=$1 [QSA,L]
RewriteCond %{REQUEST_URI} ^(.+)\~i$
RewriteRule ^(.*) share_file.php?u=$1 [QSA,L]
RewriteCond %{REQUEST_URI} ^(.+)\~f$
RewriteRule ^(.*) view_folder.php?f=$1 [QSA,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !\.html$
RewriteRule ^(.*) file_download.php?u=$1 [QSA,L]

RewriteRule ^(.*).html$ $1.php [L]
As soon as I remove the .htaccess code, I am then able to access the .htaccess page, but the the pages on the main sites are not redirecting properly.

Thank you.
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Hi,

Could you try this slightly modified version of the .htaccess file instead.

Code:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.+)\~s$
RewriteRule ^(.*) /stats.php?u=$1 [L]
RewriteCond %{REQUEST_URI} ^(.+)\~d$
RewriteRule ^(.*) /delete_file.php?u=$1 [QSA,L]
RewriteCond %{REQUEST_URI} ^(.+)\~i$
RewriteRule ^(.*) /share_file.php?u=$1 [QSA,L]
RewriteCond %{REQUEST_URI} ^(.+)\~f$
RewriteRule ^(.*) /view_folder.php?f=$1 [QSA,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !\.html$
RewriteRule ^(.*) /file_download.php?u=$1 [QSA,L]

RewriteRule ^(.*).html$ /$1.php [L]
 

luckylutz

New Member
YetiShare User
Aug 30, 2012
147
0
0
44
Schwitzerland
www.hoodload.com
Hi

I think i have the same Problem

but my problem is that when I try to edit a language that I get a 404 page. the same thing when I login. If I then manually change the url of html to php, it works. what could be the problem here.

if I use this htaccess. code, i get no error 404 pages, but I will redirect from the admin panel to front panel page when I try edit a language.

thanks for helping