Does Google Compute Engine support .htaccess files2019 Community Moderator Election.htaccess Rules Removing .php while forwarding real 404sHtaccess file does not change file extensionsWhat is the difference between Google App Engine and Google Compute Engine?Rewrite-rules issues : .htaccessHiding Extensions with .htaccess not working with Network Solutions.htaccess and Apache ModSecurityFriendly URL for multiple and long queriesRemove /index from URL with functional mainpageNot working my .htaccess and config fileshtaccess - remove trailing ext + enable trailing to querystring

Unreachable code, but reachable with exception

It's a yearly task, alright

What is the definition of "Natural Selection"?

Can the druid cantrip Thorn Whip really defeat a water weird this easily?

what does the apostrophe mean in this notation?

Why do Australian milk farmers need to protest supermarkets' milk price?

When two POV characters meet

Confusion with the nameplate of an induction motor

Is a lawful good "antagonist" effective?

How to deal with a cynical class?

What is the difference between "shut" and "close"?

Want to switch to tankless, but can I use my existing wiring?

When were linguistics departments first established

Decoding assembly instructions in a Game Boy disassembler

Humans have energy, but not water. What happens?

Prove that the total distance is minimised (when travelling across the longest path)

Best approach to update all entries in a list that is paginated?

When is a batch class instantiated when you schedule it?

Why don't MCU characters ever seem to have language issues?

Do I need to leave some extra space available on the disk which my database log files reside, for log backup operations to successfully occur?

Excess Zinc in garden soil

Force user to remove USB token

Coworker uses her breast-pump everywhere in the office

Counter-example to the existence of left Bousfield localization of combinatorial model category



Does Google Compute Engine support .htaccess files



2019 Community Moderator Election.htaccess Rules Removing .php while forwarding real 404sHtaccess file does not change file extensionsWhat is the difference between Google App Engine and Google Compute Engine?Rewrite-rules issues : .htaccessHiding Extensions with .htaccess not working with Network Solutions.htaccess and Apache ModSecurityFriendly URL for multiple and long queriesRemove /index from URL with functional mainpageNot working my .htaccess and config fileshtaccess - remove trailing ext + enable trailing to querystring










0















I'm attempting to clean some urls in a simple PHP application I have deployed on google cloud servers (Ubuntu). However, the redirect conditions I have written in a .htaccess file seemed to be ignored. I've went through Google's documentation and I haven't found a solution, I've gone through my .config files and ensured that mods_rewrite was enabled. I was thinking that because i'm on a shared server that the rules are being ignored. IF anyone has any suggestions or workarounds, please suggest.



Here is the .htaccess file for reference:



Options +MultiViews

#Remove php extension
RewriteEngine on
RewriteCond %REQUEST_FILENAME !-d
RewriteCond %REQUEST_FILENAME.php -f
RewriteRule ^(.*)$ $1.php

#Remove html extension

RewriteCond %REQUEST_FILENAME !-d
RewriteCond %REQUEST_FILENAME.html -f
RewriteRule ^(.*)$ $1.html









share|improve this question




























    0















    I'm attempting to clean some urls in a simple PHP application I have deployed on google cloud servers (Ubuntu). However, the redirect conditions I have written in a .htaccess file seemed to be ignored. I've went through Google's documentation and I haven't found a solution, I've gone through my .config files and ensured that mods_rewrite was enabled. I was thinking that because i'm on a shared server that the rules are being ignored. IF anyone has any suggestions or workarounds, please suggest.



    Here is the .htaccess file for reference:



    Options +MultiViews

    #Remove php extension
    RewriteEngine on
    RewriteCond %REQUEST_FILENAME !-d
    RewriteCond %REQUEST_FILENAME.php -f
    RewriteRule ^(.*)$ $1.php

    #Remove html extension

    RewriteCond %REQUEST_FILENAME !-d
    RewriteCond %REQUEST_FILENAME.html -f
    RewriteRule ^(.*)$ $1.html









    share|improve this question


























      0












      0








      0








      I'm attempting to clean some urls in a simple PHP application I have deployed on google cloud servers (Ubuntu). However, the redirect conditions I have written in a .htaccess file seemed to be ignored. I've went through Google's documentation and I haven't found a solution, I've gone through my .config files and ensured that mods_rewrite was enabled. I was thinking that because i'm on a shared server that the rules are being ignored. IF anyone has any suggestions or workarounds, please suggest.



      Here is the .htaccess file for reference:



      Options +MultiViews

      #Remove php extension
      RewriteEngine on
      RewriteCond %REQUEST_FILENAME !-d
      RewriteCond %REQUEST_FILENAME.php -f
      RewriteRule ^(.*)$ $1.php

      #Remove html extension

      RewriteCond %REQUEST_FILENAME !-d
      RewriteCond %REQUEST_FILENAME.html -f
      RewriteRule ^(.*)$ $1.html









      share|improve this question
















      I'm attempting to clean some urls in a simple PHP application I have deployed on google cloud servers (Ubuntu). However, the redirect conditions I have written in a .htaccess file seemed to be ignored. I've went through Google's documentation and I haven't found a solution, I've gone through my .config files and ensured that mods_rewrite was enabled. I was thinking that because i'm on a shared server that the rules are being ignored. IF anyone has any suggestions or workarounds, please suggest.



      Here is the .htaccess file for reference:



      Options +MultiViews

      #Remove php extension
      RewriteEngine on
      RewriteCond %REQUEST_FILENAME !-d
      RewriteCond %REQUEST_FILENAME.php -f
      RewriteRule ^(.*)$ $1.php

      #Remove html extension

      RewriteCond %REQUEST_FILENAME !-d
      RewriteCond %REQUEST_FILENAME.html -f
      RewriteRule ^(.*)$ $1.html






      php apache .htaccess google-cloud-platform google-compute-engine






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 6 at 18:10









      James Z

      11.2k71936




      11.2k71936










      asked Mar 6 at 17:37









      Terrell GilbertTerrell Gilbert

      12




      12






















          2 Answers
          2






          active

          oldest

          votes


















          0














          at google cloud service you can install apache2 and enbale .htaccess on it :')




          Note to enable .Htaccess go to : /etc/apache2/apache2.conf




          and search this line :



          <Directory /var/www/>
          Options Indexes FollowSymLinks
          AllowOverride None
          Require all granted
          </Directory>


          change to :



          <Directory /var/www/>
          Options Indexes FollowSymLinks
          AllowOverride All
          Require all granted
          </Directory>





          share|improve this answer























          • it's already enabled, also I think its discouraged to use the apache2.conf file as it makes it harder to update installs later, I believe its preferred to use /etc/apache2/sites-available/default.conf. But, i read that awhile ago, so I have check again.

            – Terrell Gilbert
            Mar 6 at 18:01











          • @TerrellGilbert this sounds alike an Ubuntu specific comment. Debian is the default Linux image on GCP, while CentOS is also quite popular... which don't have that directory. and a VM equals a "root server", not a "shared hosting"... whatever is being configured globally, will be picked up by the virtual host configurations.

            – Martin Zeitler
            Mar 6 at 18:03












          • It is, sorry i'll specify the distro in the question.

            – Terrell Gilbert
            Mar 6 at 18:05


















          0














          I spent a few hours playing with the .config files, if you edit the virtual host settings in 000-default.conf in the /etc/apache2/sites-available/ folder . I removed the Options Followsyslinks line. I don't know how this will effect security or performance, so I'll read up on that.



          *Note that this for apache version 2.4.18






          share|improve this answer










          New contributor




          Terrell Gilbert is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.



















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55029113%2fdoes-google-compute-engine-support-htaccess-files%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            at google cloud service you can install apache2 and enbale .htaccess on it :')




            Note to enable .Htaccess go to : /etc/apache2/apache2.conf




            and search this line :



            <Directory /var/www/>
            Options Indexes FollowSymLinks
            AllowOverride None
            Require all granted
            </Directory>


            change to :



            <Directory /var/www/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
            </Directory>





            share|improve this answer























            • it's already enabled, also I think its discouraged to use the apache2.conf file as it makes it harder to update installs later, I believe its preferred to use /etc/apache2/sites-available/default.conf. But, i read that awhile ago, so I have check again.

              – Terrell Gilbert
              Mar 6 at 18:01











            • @TerrellGilbert this sounds alike an Ubuntu specific comment. Debian is the default Linux image on GCP, while CentOS is also quite popular... which don't have that directory. and a VM equals a "root server", not a "shared hosting"... whatever is being configured globally, will be picked up by the virtual host configurations.

              – Martin Zeitler
              Mar 6 at 18:03












            • It is, sorry i'll specify the distro in the question.

              – Terrell Gilbert
              Mar 6 at 18:05















            0














            at google cloud service you can install apache2 and enbale .htaccess on it :')




            Note to enable .Htaccess go to : /etc/apache2/apache2.conf




            and search this line :



            <Directory /var/www/>
            Options Indexes FollowSymLinks
            AllowOverride None
            Require all granted
            </Directory>


            change to :



            <Directory /var/www/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
            </Directory>





            share|improve this answer























            • it's already enabled, also I think its discouraged to use the apache2.conf file as it makes it harder to update installs later, I believe its preferred to use /etc/apache2/sites-available/default.conf. But, i read that awhile ago, so I have check again.

              – Terrell Gilbert
              Mar 6 at 18:01











            • @TerrellGilbert this sounds alike an Ubuntu specific comment. Debian is the default Linux image on GCP, while CentOS is also quite popular... which don't have that directory. and a VM equals a "root server", not a "shared hosting"... whatever is being configured globally, will be picked up by the virtual host configurations.

              – Martin Zeitler
              Mar 6 at 18:03












            • It is, sorry i'll specify the distro in the question.

              – Terrell Gilbert
              Mar 6 at 18:05













            0












            0








            0







            at google cloud service you can install apache2 and enbale .htaccess on it :')




            Note to enable .Htaccess go to : /etc/apache2/apache2.conf




            and search this line :



            <Directory /var/www/>
            Options Indexes FollowSymLinks
            AllowOverride None
            Require all granted
            </Directory>


            change to :



            <Directory /var/www/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
            </Directory>





            share|improve this answer













            at google cloud service you can install apache2 and enbale .htaccess on it :')




            Note to enable .Htaccess go to : /etc/apache2/apache2.conf




            and search this line :



            <Directory /var/www/>
            Options Indexes FollowSymLinks
            AllowOverride None
            Require all granted
            </Directory>


            change to :



            <Directory /var/www/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
            </Directory>






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 6 at 17:53









            Steve Good JobSteve Good Job

            813




            813












            • it's already enabled, also I think its discouraged to use the apache2.conf file as it makes it harder to update installs later, I believe its preferred to use /etc/apache2/sites-available/default.conf. But, i read that awhile ago, so I have check again.

              – Terrell Gilbert
              Mar 6 at 18:01











            • @TerrellGilbert this sounds alike an Ubuntu specific comment. Debian is the default Linux image on GCP, while CentOS is also quite popular... which don't have that directory. and a VM equals a "root server", not a "shared hosting"... whatever is being configured globally, will be picked up by the virtual host configurations.

              – Martin Zeitler
              Mar 6 at 18:03












            • It is, sorry i'll specify the distro in the question.

              – Terrell Gilbert
              Mar 6 at 18:05

















            • it's already enabled, also I think its discouraged to use the apache2.conf file as it makes it harder to update installs later, I believe its preferred to use /etc/apache2/sites-available/default.conf. But, i read that awhile ago, so I have check again.

              – Terrell Gilbert
              Mar 6 at 18:01











            • @TerrellGilbert this sounds alike an Ubuntu specific comment. Debian is the default Linux image on GCP, while CentOS is also quite popular... which don't have that directory. and a VM equals a "root server", not a "shared hosting"... whatever is being configured globally, will be picked up by the virtual host configurations.

              – Martin Zeitler
              Mar 6 at 18:03












            • It is, sorry i'll specify the distro in the question.

              – Terrell Gilbert
              Mar 6 at 18:05
















            it's already enabled, also I think its discouraged to use the apache2.conf file as it makes it harder to update installs later, I believe its preferred to use /etc/apache2/sites-available/default.conf. But, i read that awhile ago, so I have check again.

            – Terrell Gilbert
            Mar 6 at 18:01





            it's already enabled, also I think its discouraged to use the apache2.conf file as it makes it harder to update installs later, I believe its preferred to use /etc/apache2/sites-available/default.conf. But, i read that awhile ago, so I have check again.

            – Terrell Gilbert
            Mar 6 at 18:01













            @TerrellGilbert this sounds alike an Ubuntu specific comment. Debian is the default Linux image on GCP, while CentOS is also quite popular... which don't have that directory. and a VM equals a "root server", not a "shared hosting"... whatever is being configured globally, will be picked up by the virtual host configurations.

            – Martin Zeitler
            Mar 6 at 18:03






            @TerrellGilbert this sounds alike an Ubuntu specific comment. Debian is the default Linux image on GCP, while CentOS is also quite popular... which don't have that directory. and a VM equals a "root server", not a "shared hosting"... whatever is being configured globally, will be picked up by the virtual host configurations.

            – Martin Zeitler
            Mar 6 at 18:03














            It is, sorry i'll specify the distro in the question.

            – Terrell Gilbert
            Mar 6 at 18:05





            It is, sorry i'll specify the distro in the question.

            – Terrell Gilbert
            Mar 6 at 18:05













            0














            I spent a few hours playing with the .config files, if you edit the virtual host settings in 000-default.conf in the /etc/apache2/sites-available/ folder . I removed the Options Followsyslinks line. I don't know how this will effect security or performance, so I'll read up on that.



            *Note that this for apache version 2.4.18






            share|improve this answer










            New contributor




            Terrell Gilbert is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.
























              0














              I spent a few hours playing with the .config files, if you edit the virtual host settings in 000-default.conf in the /etc/apache2/sites-available/ folder . I removed the Options Followsyslinks line. I don't know how this will effect security or performance, so I'll read up on that.



              *Note that this for apache version 2.4.18






              share|improve this answer










              New contributor




              Terrell Gilbert is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.






















                0












                0








                0







                I spent a few hours playing with the .config files, if you edit the virtual host settings in 000-default.conf in the /etc/apache2/sites-available/ folder . I removed the Options Followsyslinks line. I don't know how this will effect security or performance, so I'll read up on that.



                *Note that this for apache version 2.4.18






                share|improve this answer










                New contributor




                Terrell Gilbert is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.










                I spent a few hours playing with the .config files, if you edit the virtual host settings in 000-default.conf in the /etc/apache2/sites-available/ folder . I removed the Options Followsyslinks line. I don't know how this will effect security or performance, so I'll read up on that.



                *Note that this for apache version 2.4.18







                share|improve this answer










                New contributor




                Terrell Gilbert is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer








                edited Mar 7 at 14:24





















                New contributor




                Terrell Gilbert is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered Mar 7 at 14:16









                Terrell GilbertTerrell Gilbert

                12




                12




                New contributor




                Terrell Gilbert is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                Terrell Gilbert is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                Terrell Gilbert is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55029113%2fdoes-google-compute-engine-support-htaccess-files%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    1928 у кіно

                    Захаров Федір Захарович

                    Ель Греко