Forum Moderators: phranque
Greetings.
I know only little about modrewrite. And this is not working.
Rewrite Rule ^view/music\.html$ index.php?loadpage=./lib/view.php&category=$1 [L]
Actual url: www.site.com/view/music.html
I don't know why this is not working. Can someone help me with this. I'll greatly appreciate any help.
Thanks
index.php?loadpage=./lib/view.php&category=music ->for music category
index.php?loadpage=./lib/view.php&category=finance -> for finance category
What the script do is list the articles of particular categories. These works without modrewrite. With modrewrite rule I only need to pass category variable to the script through .htaccess.
Alternatively, you can detect and rewrite the URLs to image, media, CSS, and JS includes to correct them, but this creates duplicate content.
Remember that it is the client (the browser) which resolves relative URLs. The client now thinks your page is located in the subdirectory /view, and all page-relative URLs will be resolved to that directory. You can check your server error and access logs to confirm this.
Jim