我将.htaccess文件放在con = sqlite3.connect('utpg.db')
db = con.cursor()
user_id = session.get('id')
getpackages = db.execute("SELECT pck_id, client_id, date, price, privatelesson, shortgamelesson, playinglesson, notes FROM packages WHERE client_id = ?;", (user_id, ))
packages = getpackages.fetchall()
for row in packages:
print(row)
目录下。我想重写从example.com/new
到example.com/new/it/keyword
的每个网址。我目前的example.com/new/index.php?lang=it&keyword=keyword
是这样的:
.htaccess
问题是RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)/(.+) index.php?lang=$1&keyword=$2 [L]
工作正常,但example.com/new/it/keyword/
不加载CSS和图片,只加载HTML。我该如何解决?
答案 0 :(得分:0)
使用样式表和HTML页面中其他资源的绝对路径,例如
<link rel="stylesheet" href="/path/to/css/styles.css">