Jump to content
php.lv forumi

Konkrēta faila nerādīšana urlī


senters

Recommended Posts

labsvakars! kā ar .htaccess palīdzību uzrakstīt, lai ierakstot urlī lapa.lv/template/intro-events.php tiktu redirektēts uz lapa.lv?

šajā failā atrodas json masīvs, kurš tiek pasaukts citā vieta un "ejot pa taisno", urlī padodot ceļu uz failu, tiek rādīts "null".

pašas direktorijas nevar nolistot, rakstot lapa.lv/template/ tiek parādīts 403 error.

Link to comment
Share on other sites

pielaago savaam vajadziibaam:

 

RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} !.post\.php*
RewriteCond %{HTTP_REFERER} !.*example\.com.*
RewriteRule (.*) / [R,L]
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...