Jump to content
php.lv forumi

Problēma ar rewrite rules


nemakuphp
 Share

Recommended Posts

Ir šādi rewrite rules - http://pastebin.com/SQsJLtvY
 
URL ir http://domain.tld/path/to/file.js
 
Problēma ir tāda, ka "path/to/file.js" aiziet infinite loopā (izskatās, ka to veido pats pēdējais rule) veidojot linkus http://domain.tld/index.phppath/to/file.jsindex.phppath/to/file.js...
 
Kā šo varētu atrisināt?

Link to comment
Share on other sites

Tā ir Tevis paša custom sistēma, kurai to vajag ? Saprotu, pārtaisīt varbūt būtu apjomīgs darbs, bet es nekad, nekad nečakarējos ar htaccess rulēm, vnk paņemu vienu nemainīgu htaccess failu, kurš nodod kontroli uz PHP skriptu, un PHP skripts pats analizē padoto adresi un dara ko vien vajag...

 

Var lietot Wordpress variantu http://codex.wordpress.org/htaccess

Man šāds ir http://pastebin.com/wHvaHUN4

 

PHP iegūst URL ceļu:

<?php 

$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
var_dump($path);

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...
 Share

×
×
  • Create New...