PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > alt.php > url and no php file see
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
url and no php file see

Réponse
 
LinkBack Outils de la discussion
Vieux 29/09/2007, 16h48   #1
artev
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut url and no php file see

example that I want to do:
if I have this 3 files
MYSITE.com/index.php
MYSITE.com/one.php
MYSITE.com/two.php

I want that file two.php and file three.php aren't never accesible by url;
I think that is necessary some row in htaccess; not sure if is this
solution; or is necessary change file's CHMD ?

------------------------------------------------------------------------------------------------
other similar
MYSITE.com/index.php
MYSITE.com/A/B/one.php
MYSITE.com/A/C/X/other.php

is possible write in htaccess a code that if one write
MYSITE.com/A/B/one.php or MYSITE.com/A/C/X/other.php
is redirect always at index or see an error in the page?

-------------------------------------------------------------------------
other:
for a directory which is the code for protect all the file excluse the
index files ?
  Réponse avec citation
Vieux 29/09/2007, 17h04   #2
J.O. Aho
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: url and no php file see

artev wrote:

> I want that file two.php and file three.php aren't never accesible by url;
> I think that is necessary some row in htaccess; not sure if is this
> solution; or is necessary change file's CHMD ?


If you chmod/chown the files so that apache can't read the files, then they
won't be possible to execute them, but you will also not be able to include
those files in other scripts that are run via the apache.


> is possible write in htaccess a code that if one write
> MYSITE.com/A/B/one.php or MYSITE.com/A/C/X/other.php
> is redirect always at index or see an error in the page?


Yes, it's possible, I do suggest you look at apache.org for mod_rewrite.

> -------------------------------------------------------------------------
> other:
> for a directory which is the code for protect all the file excluse the
> index files ?


I would suggest you just had the index file in the root directory and then put
all the other files in a sud directory which you limit the access to, it's a
lot nicer way to administrate the rights than have to reedit the .htaccess
each time you create a new file.


--

//Aho
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 18h49.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09135 seconds with 10 queries