开发者

Change URL using .htaccess

I want to change url for example http://localhost/mysite/index.php?page=about will become http://localhost/mysite/index/about

I also used RewriteRule ^index/(.*) /index.php?page=$1 and if I type http://localhost/mysite/index/about in URL bar then it redirects to http://localhost/xampp/splash.php, the page which shows that XAMPP is working fine.

One think more mod_rewrite is also enabled.

and if I use

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all other URLs 
RewriteRule ^index/(.*)$ index.php?page=$1 [PT,L]

It shows the correct page but does not add style s开发者_Go百科heet and does not show images and also jQuery files. And Firebug shows numbers of different errors eg:

  1. $ is not defined
  2. syntax error
  3. jQuery is not defined
  4. $("#slider-two").movingBoxes is not a function

any guide....?


Specify the full path of the files you call for scripts, images and stylesheets like

<link type="text/stylesheet" src="http://www.example.com/styles/main.css" />
<script type="text/javascript" src="http://www.example.com/scripts/jquery-min.js"></script>
<script type="text/javascript" src="http://www.example.com/scripts/jquery-slider.js"></script>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜