Jump to content
php.lv forumi
Sign in to follow this  
newnew

.htaccess folderi zemāk

Recommended Posts

Man neizdodas ar .htaccess failu pakāpties vienu folderi zemāk?

 

1) Man vajaga no http://localhost pakāpties folderī public:

 

RewriteEngine On

RewriteCond %{HTTP_HOST} ^localhost$ [OR]

RewriteCond %{REQUEST_URI} !^/public/

RewriteRule (.*) /public/$1

 

2) Tas pats, ja no xxx.bbbbb.com pakāpties vienu folderi zemāk.

 

Es šo .htaccess lieku root direktorijā (kur pēc noklusējuma stāvošais index.html tiek palaists). Tajā root direktorijā ir folderis public, kurā ir index.php. Un vajaga lai šis index.php būtu aktīvais fails.

Vēl šajā root direktorijā ir virkne nepublisko folderu, piemēram, class, library, templ. Šiem folderiem nav jābūt publiskiem.

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.

Loading...
Sign in to follow this  

×
×
  • Create New...