mod rewrite - mod_rewrite in production environment doesn't yield the same results as locally -
the goal links http://www.example.com/company/[rest-of-the-link] go http://www.example.com/company/#[rest-of-the-link], append hash symbol after company/
. have achieved locally following rewrite (use ne flag ensuring hash symbol work correctly):
rewritecond %{request_uri} ^/company/[^#].*$ [nc] rewriterule ^company/(.*)$ http://www.example.com/company/#$1 [ne,l]
however, when take same .htaccess file , put in server root (file structure , database identical locally , in production), , go http://www.example.com/company/members, 404 error.
moreover, example rule
rewriterule ^company/(.*)$ http://www.example.com/ [ne,l]
would cause 404 error, while example
rewriterule ^company/(.*)$ http://www.google.com/ [ne,l]
works alright , redirects google.
so wondering, cause such strange behavior, don't know start. thank in advance!
Comments
Post a Comment