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
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
add a comment |
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
add a comment |
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
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
php apache .htaccess google-cloud-platform google-compute-engine
edited Mar 6 at 18:10
James Z
11.2k71936
11.2k71936
asked Mar 6 at 17:37
Terrell GilbertTerrell Gilbert
12
12
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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>
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 anUbuntu
specific comment.Debian
is the default Linux image onGCP
, whileCentOS
is also quite popular... which don't have that directory. and aVM
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
add a comment |
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
New contributor
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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>
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 anUbuntu
specific comment.Debian
is the default Linux image onGCP
, whileCentOS
is also quite popular... which don't have that directory. and aVM
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
add a comment |
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>
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 anUbuntu
specific comment.Debian
is the default Linux image onGCP
, whileCentOS
is also quite popular... which don't have that directory. and aVM
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
add a comment |
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>
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>
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 anUbuntu
specific comment.Debian
is the default Linux image onGCP
, whileCentOS
is also quite popular... which don't have that directory. and aVM
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
add a comment |
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 anUbuntu
specific comment.Debian
is the default Linux image onGCP
, whileCentOS
is also quite popular... which don't have that directory. and aVM
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
add a comment |
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
New contributor
add a comment |
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
New contributor
add a comment |
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
New contributor
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
New contributor
edited Mar 7 at 14:24
New contributor
answered Mar 7 at 14:16
Terrell GilbertTerrell Gilbert
12
12
New contributor
New contributor
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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