Jump to content
php.lv forumi

Recommended Posts

Sveiki. Man ir htaccess fails

Options +FollowSymlinks
Options -Indexes
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .* - [L]

#RewriteCond %{HTTP_HOST} !^www\.nekas\.lv [NC]
RewriteCond %{HTTP_HOST} ^(.*)\.nekas\.lv [NC]

RewriteRule (.*) cv.php?user=%1&id=$1 [L]

Ar šo esmu panācis, ka jebkurš subdomēns aiziet par user padodamā mainīgā vērtību un jebkura direktorija aiziet par id padodamā mainīgā vērtību. Bet notiek nepatīkama lieta, kad ieraksta kā direktoriju "portfolio". Piemērs:

http://janis.nekas.lv/portfolio

Notiek redirekts uz

http://janis.nekas.lv/portfolio/?user=janis&id=portfolio

Link to post
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...