Jump to content
php.lv forumi

mod rewrite


teobalds

Recommended Posts

Vai kāds zin, kā ar mod rewrite var jūzeri veiksmīgi uz lapas indexu aizmest?

 

RewriteRule ^page/([^/\.]+)/?$ index_test.php?page=$1 [L]

 

ko var patraucēt ar šādu rewrite ruli swf ielādei - man šitādu prieku darbinot, sāka lamāties, ka nav AC_RunActiveContent.js vairs pieejams, mēģinot browserī palaist URLi www.somedemen.lv/page/?

Link to comment
Share on other sites

Priekškam tev šo rindiņu RewriteCond %{REQUEST_URI} !\.(css|js|jpg|gif|jpeg) ? Vienīgais, ko viņa darīs, būs - Error 404, jo RewriteCond %{REQUEST_FILENAME} !-f rindiņa pati par sevi norāda, ka ja eksistē fails, tad rewrite tiek pārtraukts.

Link to comment
Share on other sites

Parasti ja kabina klāt to .js failu, tad piemēram ja index.php ir pamata fails, blakus tam stāv kāda mape kurā atrodas .js fails, piemeram "asdasdas", tad index failā .js faila piekabinājuma adresei jābūt attiecīgi asdasdas/failanosaukums.js neatkarīgi no citiem failiem. Ja piemēram index.php includē kādu citu php failu, teiksim kura direktorija ir asdasdas/mape/mape2/fails.php tad vienalga adrese paliek tāda pati - asdasdas/failanosaukums.js

Edited by MCWeb.lv
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...