linux - New Apache Server - Trouble with .htaccess -


(pardon me, i've injured right hand i'll have trouble typing)

i've set new linux server running off 'lamp stack'. used putty, git , friends. usually, work in pre-set environment - i'm app developer. technically count first 'solo venture'. i've never been given root access server before, there work.

so, started, decided port of work previous project , build off of that. relies heavily on rewrite rules. ignorantly, assumed .htaccess file magically work. doesn't - whatever reason, apache wants enable use of rewrite rules (it's not you'd accidentally set .htaccess file, dear me).

so, i've read various tutorials, followed guides, asked elsewhere - i'm not getting anywhere. point, here's i've done:

1. enable use of .htaccess files @ /etc/apache2/sites-available/default-ssl.conf:

 <directory /var/www/html>                 options indexes followsymlinks multiviews                 allowoverride                 order allow,deny                 allow  </directory> 

2. create .htaccess file @ var/www/html/site:

rewriteengine on rewritecond %{document_root}%{request_uri} !-f rewritecond %{document_root}%{request_uri} !-d rewriterule ^(.*)$ %{document_root}/site/index.php [l] 

3. now, should able reach url located @ http://www.example.com/site/index.php/bool via http://www.example.com/bool (bool query string - page identifier). can't in case - you're told there's no file titled 'bool' on server.

the rewrite rules given in section 2 have worked before, don't work here.

some guides tell wacky stuff set password system @ /etc/htaccess/.htpasswd , have .htaccess file call on or something. despite other rewrite rules not working in new server environment, 'password' system did work (i asked provide password before accessing page) - however, don't need or want restricted access pages that.

practically i've tried has not worked - , that's ranged changing path in <directory> tag within default-ssl.conf putting .htaccess files here , there, , without password systems, different 'code' in .htaccess/configuration files, , more. practically every 'guide' provides different solution, including , excluding details , steps others do/don't.

i've attempted changing allowoverride all in /etc/apache2/apache2.conf no success - internal server error.

the grand question: how enable use of .htaccess files anywhere need them? has using correct configuration somewhere, happen have working on server, i'd see did.

i'm excited in charge of own server, it's been wonderful learning experience , surprisingly, learning curve hasn't been difficult. hope can app running on properly.

if unfortunately htaccess file not being read server in case can use command in order enable htaccess accessibity onto server.

to enable htaccess file on rackspace server(debian os) sudo a2enmod rewrite

and restart apache server accessible. raghwendra pathak


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -