簡體   English   中英

htaccess xampp無法正常工作

[英]htaccess xampp not working

我需要幫助我的.htaccess我想要的是改變這個網址

HTTP://localhost/blog/admin/editar_articulo.php安信永= 27

HTTP://本地主機/博客/管理/ editar_articulo / 27

但我的代碼不起作用。 顯示服務器錯誤500,我有這個代碼我使用xampp

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/admin # in folder admin is where i have the .htaccess file
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^editar_articulo/([0-9]+)/?$ editar_articulo.php?accion=$1 [NC,QSA]
</IfModule>

我試過這個並且工作了

RewriteEngine On
RewriteRule ^editar_articulo/(\w+)$ editar_articulo.php?accion=$1

但它沒有在頁面中顯示我的CSS我做錯了什么?

<head>標簽中創建<base>標簽以設置所有外部鏈接url

<head>
  <base href="http://www.mywebsite.com/">
  <link rel="stylesheet" href="css/mycssfile.css">
</head>

瀏覽器讀取href="css/mycssfile.css"href="http://www.mywebsite.com/css/mycssfile.css"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM