mod_rewrite in alias directory not working.htaccess not working (mod_rewrite)Apache mod_rewrite not workingHow to Protect Apache server from this attack.htaccess mod_rewrite not workingmod_rewrite not working on virtual directoryMod_rewite - do these rewrite rules work?intermittent AWS Linux AMI server error “File does not exist: /var/www/html/var”Apache2 randomly stop working, error 403mod_rewrite not working for apache alias
Why do bosons tend to occupy the same state?
One verb to replace 'be a member of' a club
Are there any examples of a variable being normally distributed that is *not* due to the Central Limit Theorem?
What exploit Are these user agents trying to use?
How can I deal with my CEO asking me to hire someone with a higher salary than me, a co-founder?
Valid term from quadratic sequence?
Personal Teleportation: From Rags to Riches
I would say: "You are another teacher", but she is a woman and I am a man
Am I breaking OOP practice with this architecture?
How can saying a song's name be a copyright violation?
Unlock My Phone! February 2018
Why didn't Miles's spider sense work before?
iPad being using in wall mount battery swollen
How to show a landlord what we have in savings?
Mathematica command that allows it to read my intentions
How dangerous is XSS?
Can we compute the area of a quadrilateral with one right angle when we only know the lengths of any three sides?
CAST throwing error when run in stored procedure but not when run as raw query
Could the museum Saturn V's be refitted for one more flight?
Why is this clock signal connected to a capacitor to gnd?
Method Does Not Exist error message
Extract rows of a table, that include less than x NULLs
Do scales need to be in alphabetical order?
What method can I use to design a dungeon difficult enough that the PCs can't make it through without killing them?
mod_rewrite in alias directory not working
.htaccess not working (mod_rewrite)Apache mod_rewrite not workingHow to Protect Apache server from this attack.htaccess mod_rewrite not workingmod_rewrite not working on virtual directoryMod_rewite - do these rewrite rules work?intermittent AWS Linux AMI server error “File does not exist: /var/www/html/var”Apache2 randomly stop working, error 403mod_rewrite not working for apache alias
I have a wp blog which lives under /var/www/mysite.com/blog and is accessible via www.mysite.com/blog
When visiting www.mysite.com/blog/ I see the index page, but all links on subdirectories are no longer working eg: www.mysite.com/blog/my-great-article is throwing (apache log):
File does not exist: /var/www/mysite.com/web/blog/my-great-article,
referer: http://www.mysite.com/blog/
vhost:
Alias /blog "/var/www/mysite.com/web/blog"
<Location "/blog">
Allow from all
AddType application/x-httpd-php php php4 php3 html htm
</Location>
.htacess in /blog dir:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index.php$ - [L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
How can I fix that?
apache-2.2 .htaccess mod-rewrite virtualhost
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have a wp blog which lives under /var/www/mysite.com/blog and is accessible via www.mysite.com/blog
When visiting www.mysite.com/blog/ I see the index page, but all links on subdirectories are no longer working eg: www.mysite.com/blog/my-great-article is throwing (apache log):
File does not exist: /var/www/mysite.com/web/blog/my-great-article,
referer: http://www.mysite.com/blog/
vhost:
Alias /blog "/var/www/mysite.com/web/blog"
<Location "/blog">
Allow from all
AddType application/x-httpd-php php php4 php3 html htm
</Location>
.htacess in /blog dir:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index.php$ - [L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
How can I fix that?
apache-2.2 .htaccess mod-rewrite virtualhost
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Does the configuration work when you put it inside the main config instead of.htaccess, and do you have anAllowOverridedirective allowing the use of.htaccessfiles?
– Shane Madden♦
Aug 13 '12 at 4:19
Shane's comment is likely to be the solution.
– user130370
Aug 13 '12 at 9:31
add a comment |
I have a wp blog which lives under /var/www/mysite.com/blog and is accessible via www.mysite.com/blog
When visiting www.mysite.com/blog/ I see the index page, but all links on subdirectories are no longer working eg: www.mysite.com/blog/my-great-article is throwing (apache log):
File does not exist: /var/www/mysite.com/web/blog/my-great-article,
referer: http://www.mysite.com/blog/
vhost:
Alias /blog "/var/www/mysite.com/web/blog"
<Location "/blog">
Allow from all
AddType application/x-httpd-php php php4 php3 html htm
</Location>
.htacess in /blog dir:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index.php$ - [L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
How can I fix that?
apache-2.2 .htaccess mod-rewrite virtualhost
I have a wp blog which lives under /var/www/mysite.com/blog and is accessible via www.mysite.com/blog
When visiting www.mysite.com/blog/ I see the index page, but all links on subdirectories are no longer working eg: www.mysite.com/blog/my-great-article is throwing (apache log):
File does not exist: /var/www/mysite.com/web/blog/my-great-article,
referer: http://www.mysite.com/blog/
vhost:
Alias /blog "/var/www/mysite.com/web/blog"
<Location "/blog">
Allow from all
AddType application/x-httpd-php php php4 php3 html htm
</Location>
.htacess in /blog dir:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index.php$ - [L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
How can I fix that?
apache-2.2 .htaccess mod-rewrite virtualhost
apache-2.2 .htaccess mod-rewrite virtualhost
asked Aug 12 '12 at 17:02
JayJay
1113
1113
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Does the configuration work when you put it inside the main config instead of.htaccess, and do you have anAllowOverridedirective allowing the use of.htaccessfiles?
– Shane Madden♦
Aug 13 '12 at 4:19
Shane's comment is likely to be the solution.
– user130370
Aug 13 '12 at 9:31
add a comment |
Does the configuration work when you put it inside the main config instead of.htaccess, and do you have anAllowOverridedirective allowing the use of.htaccessfiles?
– Shane Madden♦
Aug 13 '12 at 4:19
Shane's comment is likely to be the solution.
– user130370
Aug 13 '12 at 9:31
Does the configuration work when you put it inside the main config instead of
.htaccess, and do you have an AllowOverride directive allowing the use of .htaccess files?– Shane Madden♦
Aug 13 '12 at 4:19
Does the configuration work when you put it inside the main config instead of
.htaccess, and do you have an AllowOverride directive allowing the use of .htaccess files?– Shane Madden♦
Aug 13 '12 at 4:19
Shane's comment is likely to be the solution.
– user130370
Aug 13 '12 at 9:31
Shane's comment is likely to be the solution.
– user130370
Aug 13 '12 at 9:31
add a comment |
1 Answer
1
active
oldest
votes
I run into the same problem and What helped in my case was to add RewriteBase in the .htaccess of the domain alias root
RewriteBase /blog
Withought the trailing slash, and also in RewriteRule to reference index.php instead of /blog/index.php
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
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%2fserverfault.com%2fquestions%2f416738%2fmod-rewrite-in-alias-directory-not-working%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I run into the same problem and What helped in my case was to add RewriteBase in the .htaccess of the domain alias root
RewriteBase /blog
Withought the trailing slash, and also in RewriteRule to reference index.php instead of /blog/index.php
add a comment |
I run into the same problem and What helped in my case was to add RewriteBase in the .htaccess of the domain alias root
RewriteBase /blog
Withought the trailing slash, and also in RewriteRule to reference index.php instead of /blog/index.php
add a comment |
I run into the same problem and What helped in my case was to add RewriteBase in the .htaccess of the domain alias root
RewriteBase /blog
Withought the trailing slash, and also in RewriteRule to reference index.php instead of /blog/index.php
I run into the same problem and What helped in my case was to add RewriteBase in the .htaccess of the domain alias root
RewriteBase /blog
Withought the trailing slash, and also in RewriteRule to reference index.php instead of /blog/index.php
answered Aug 10 '17 at 18:54
Gabriel SolomonGabriel Solomon
96313
96313
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- 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%2fserverfault.com%2fquestions%2f416738%2fmod-rewrite-in-alias-directory-not-working%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
Does the configuration work when you put it inside the main config instead of
.htaccess, and do you have anAllowOverridedirective allowing the use of.htaccessfiles?– Shane Madden♦
Aug 13 '12 at 4:19
Shane's comment is likely to be the solution.
– user130370
Aug 13 '12 at 9:31