localhost, xampp, win 7
site path:C:\xampp\htdocs
ews\s02
so all relevant files, including .htaccess
is under s02
folder.
links like this work fine:http://localhost/news/s02/view.php?art=160915142500&title=blue-sky
I want the following computed urlhttp://localhost/articles/160915142500/blue-sky
.htaccess
RewriteEngine on
RewriteBase /
RewriteRule ^articles/([0-9]+)/([a-zA-Z-_]*)$ view.php?art=$1&title=$2 [NC,L]
result - error 404
httpd.confLoadModule rewrite_module modules/mod_rewrite.so
- uncommentedAllowOverride All
- all instances
When I move .htaccess
file to:C:\xampp\htdocs
and change RewriteRule to:RewriteRule ^articles/([0-9]+)/([a-zA-Z-_]*)$ news/s02/view.php?art=$1&title=$2 [NC,L]
there is no error 404
, i.e. view.php
is loaded, but without images, css and js files (they are all under previous, i.e. s02
folder.
How to keep .htaccess
file under site root (s02
) and load view.php
with all its elements?
restarting xampp and apache and mysql modules doesn't help.