Reputation: 15666
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 sheet and does not show images and also jQuery files. And Firebug shows numbers of different errors eg:
any guide....?
Upvotes: 0
Views: 969
Reputation: 4688
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>
Upvotes: 1