computerzworld;10923725 wrote:hello, thanks for the reply. I have tried as what you 've said but it is not redirecting the url as well as the pages. I have also tried by appending $1 after url in order to make it dynamic. But still its not working. I want to know is it possible anyhow to redirect all the pages of the site from non www to www? I mean if user clicks on the url from search engine then there may be possiblity that user will get the url with the pages i mean example.com/index.php so he/she will be automatically get redirected to www url.
Not sure why but its lower casing the RewriteRule and the RewriteCond directive statements.
As for $1 it is usually whatever you have in the URI which is dictated by this part of the rewriterule statement, /(.)$, the (.) is the uri that will become $1.
If its not working at all, are you sure you added this?
RewriteEngine on