Jump to content
php.lv forumi

Include


kalabox

Recommended Posts

Sveiki gribeeju pajautaat, vai ir iespeejams dabuut gatavu, man piem lapa atrodas uz ta pasha servera tik citaa direktorijaa, nav root direktorijaa, un liidz ar to piem. http://www.tratra.lv nestraa straadaa tikai taa tratra.lv/se

 

gribeeju uzzinaat vai var izdariit taa: root direktorijaa ielikt index.php un tamajaa index.php incluudot no /se/ mapes to index.php failu un tad lai straada lapa ar tratra.lv domenu, nevis ar tests.tratra.lv subdomenu..?

Link to comment
Share on other sites

Kāpēc, vienkārši, nevar root'a index.php ielikt redirect'u, kas "pārmet uz" vajadzīgo mapi? Vai ar .htaccess nomainīt root'a direktoriju? =)

 

Neesmu mēģinājis, bet domāju, ka ar include() / require() nesanāks.

Link to comment
Share on other sites

kaut kaa taa??

 

RewriteEngine on

RewriteCond %{HTTP_HOST} ^(www.)?tratra.lv$

RewriteCond %{REQUEST_URI} !^/se/

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /se/$1

RewriteCond %{HTTP_HOST} ^(www.)?tratra.lv$

RewriteRule ^(/)?$ se/index.php [L]

 

???

 

Sanaaca baigi labi

Edited by kalabox
Link to comment
Share on other sites

gribeeju uzzinaat vai var izdariit taa: root direktorijaa ielikt index.php un tamajaa index.php incluudot no /se/ mapes to index.php failu un tad lai straada lapa ar tratra.lv domenu, nevis ar tests.tratra.lv subdomenu..?

Kam taada izvirtiiba?

index.php redirekteet (parmest) uz citu index.php?

 

nevar uzreiz vinju tur kopeet?

--

a ja vajag lai nebuutu www.xx.lv/yy/ bet uzreiz ta direktorija yy stradatu piemeram ka www.xx.lv

tad to var elementari piekonfiguret ieksh psha web servera .. prieksh APACHE shadi:

ieksh httpd.conf

NameVirtualHost *:80 

<VirtualHost *:80>
ServerName www.xxx.lv
DocumentRoot  "C:/Apache/htdocs/xxx/yy"
</VirtualHost> 

papildus tur var noradiit vel daudzus parametrus

Link to comment
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...
×
×
  • Create New...