我的htaccess上有这种奇怪的行为: 所有“前”链接都工作正常,但在editar_post和editar_usuario,包含GET参数的那些,我丢失了所有的CSS和JS文件:
RewriteEngine On
###### Admin #####
# Posts
RewriteRule ^listar_posts/?$ listar_posts.php [NC]
RewriteRule ^editar_post/?$ editar_post.php [NC]
RewriteRule ^editar_post/([0-9]+)/?$ editar_post.php?post_id=$1 [NC]
RewriteRule ^nuevoPost/?$ nuevoPost.php [NC]
# Usuarios
RewriteRule ^listar_usuarios/?$ listar_usuarios.php [NC]
RewriteRule ^nuevo_usuario/?$ nuevo_usuario.php [NC]
RewriteRule ^editar_usuario/([0-9]+)/?$ editar_usuario.php?id_usuario=$1 [NC]
RewriteRule ^editar_usuario/?$ editar_usuario.php [NC]
# Login
RewriteRule ^login/?$ login.php [NC]
#Front
RewriteRule ^front/?$ front/index.php [NC]
RewriteRule ^front/([0-9]+)/?$ front/post.php?post_id=$1 [NC]
RewriteRule ^front/tecnologia?$ front/search.php?seccion=Tecnologia [NC]
RewriteRule ^front/marketing?$ front/search.php?seccion=Marketing [NC]
RewriteRule ^front/emprende?$ front/search.php?seccion=Emprende [NC]
RewriteRule ^front/tips?$ front/search.php?seccion=Tips [NC]
你能帮帮我吗?
(如果我把CSS和JS放在绝对路径上,我会失去一切,不管怎么样)
答案 0 :(得分:1)
htaccess正在运行但是基础href添加元
<head>
<base href="http://www.domain.com/" />
</head>