Jump to content
php.lv forumi

RewriteEngine


euphoric

Recommended Posts

Sveicināti !

 

Uz localhost'a stāvēja lapa(viss darbojās), pārmetu uz hostingu, tagad met ārā 404 erroru.

 

Ja šādi iet : www.example.lv/index.php/welcome - viss Oke..

 

www.example.lv/welcome - 404

 

.htaccess

# Turn on URL rewriting
RewriteEngine On

# Installation directory
RewriteBase /index.php

# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>

# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]

 

Kur varētu būt problēma ?

 

Paldies.

Link to comment
Share on other sites

Cik saprotu, tad te tiek mēģināts izņemt no adreses code ignitera index.php daļu.

 

Es tam izmantoju šādu vienkāršu rewirte rule

 

RewriteEngine on
RewriteRule ^$ index.php [L]
RewriteCond $1 !^(index.php|assets|captcha|fonts|useruploads|robots.txt)
RewriteRule ^(.*)$ index.php/$1 [L] 

Edited by 101111
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...