Jump to content
Sign in to follow this  
C)zy

Redirectionare Fisier Catre Index

Recommended Posts

Buna ziua am si eu o rugaminte....vreau un cod in .htaccess astfel incat lumea cand acceseaza (hackeri) un anumit fisier spre exemplu ( www.csmaniack.com/admin) ei sa fie redirectionati catre www.csmaniack.com/404.html. Se poate ? multumesc anticipat

Share this post


Link to post
Share on other sites

Pentru a redirectiona accesarea folder-ului admin, catre un alt fisier, folosesti linia de mai jos in .htaccess:

RedirectMatch 301 ^/admin/ http://www.csmaniack.com/404.html
Ideea e ca atunci cand vei accesa www.csmaniack.com/admin vei fi si tu redirectionat catre pagina 404, deci, nu cred ca vrei asta. Asadar, in momentul de fata vad ca mie imi este interzis accesul catre pagina www.csmaniack.com/admin: You don't have permission to access /admin on this server., solutia fiind gasita probabil aici: , mai exact:
deny from all
allow from 192.126.12.199
[/code] sau
[code]<Files admin.php>
order allow,deny
deny from all
allow from 192.126.12.199
</Files>

* unde 192.126.12.199 este IP-ul (exemplu) tau.

Share this post


Link to post
Share on other sites

Pe localhost mi se pare ca nu e activat by default fisierul .htaccess. Vezi si pe aici:

 

http://www.hotscripts.com/forums/web-servers/32169-solved-htaccess-not-working-localhost.html

https://forums.digitalpoint.com/threads/htaccess-on-localhost.13129/

http://www.kirupa.com/forum/showthread.php?322101-Enable-htaccess-on-localhost

 

A, acum am citit mai bine, tu vrei din folder in folder? Daca vrei din folder in folder, incearca:

RewriteEngine on
RewriteBase /
RewriteRule ^old_dir/(.*) http://www.example.com/new_dir/ [R=301,L]

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...