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













2















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?










share|improve this question














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 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















2















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?










share|improve this question














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 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













2












2








2








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?










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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 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

















  • 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
















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










1 Answer
1






active

oldest

votes


















0














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






share|improve this answer























    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
    );



    );













    draft saved

    draft discarded


















    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









    0














    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






    share|improve this answer



























      0














      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






      share|improve this answer

























        0












        0








        0







        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






        share|improve this answer













        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







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 10 '17 at 18:54









        Gabriel SolomonGabriel Solomon

        96313




        96313



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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

            How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

            What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

            Esgonzo ibérico Índice Descrición Distribución Hábitat Ameazas Notas Véxase tamén "Acerca dos nomes dos anfibios e réptiles galegos""Chalcides bedriagai"Chalcides bedriagai en Carrascal, L. M. Salvador, A. (Eds). Enciclopedia virtual de los vertebrados españoles. Museo Nacional de Ciencias Naturales, Madrid. España.Fotos