2016-12-26 96 views
1

我需要我的.htaccess幫我想是改變這個網址htaccess的XAMPP不工作

http://localhost/blog/admin/editar_articulo.php?accion=27

http://localhost/blog/admin/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我究竟做錯了什麼?

回答

0
<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"