htaccess重写规则显示页面没有css

时间:2016-08-29 17:34:02

标签: .htaccess mod-rewrite url-rewriting

我在使用.htaccess文件重写网址时遇到问题。 在我的情况下它要么不起作用,要么重定向到没有CSS的页面。 我已经设置了3个测试规则。他们在这里:

RewriteEngine On

RewriteRule ^index/?$ index.php [NC] 
RewriteRule ^index/women/?$ index-women.php [NC] 
RewriteRule ^index/men/?$ index-men.php [NC] 
order deny,allow
deny from all
allow from 79.75.60.8

AddHandler application/x-httpd-php56 .php .php5 .php4 .php3

我拒绝从我自己旁边的任何IP地址进行访问。

首先,当我进入我的页面时,它会自动显示带扩展名的页面名称(即www.example.com/index.php)。我需要手动更改网址到www.example.com/index。当我这样做时,会显示没有任何样式的页面。

如何重定向到包含css的网页? 另外,我如何确保每次都不必手动更正网址?

PS。我已经google了一些教程,但有没有人知道一个很好的教程,所有符号/字母也解释了?非常感谢。

0 个答案:

没有答案
相关问题