Jump to content
php.lv forumi

modrewrite uz localhosta


Sasa

Recommended Posts

.htaccess failā ir ieraksts:

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteBase /
	RewriteRule ^index\.php$ - [L]
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule . /index.php [L]
</IfModule>

Jautājums ja man uz localhosta lapa neatrodas tieši iekš htdocs mapes, bet gan //localhost/nosaukums/wordpress/ tad man ir kaut kas jāmaina .htaccess failā, jo tagad ir tā ja es spiežu uz kāda linka tad mani pārmet atpakaļ uz localhost.

Link to comment
Share on other sites

RewriteRule . /index.php [L]

pamēģini bez /:

RewriteRule . index.php [L]

man vienā lapā ir šādi:

RewriteRule    ^[a-zA-Z0-9_/\-]*$ index.php [L]

tas punkts, kas tavā gadījumā, kā regex simbolizē "jebkāds viens simbols", tad tas droši vien būtu jāraksta šādi,lai tver "jebkāds strings":

RewriteRule .* index.php [L]
Edited by gurkjis
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...