Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6028507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:45:00+00:00 2026-05-23T04:45:00+00:00

I run my own server at home. I am attempting to do a mod_rewrite

  • 0

I run my own server at home. I am attempting to do a mod_rewrite but I cannot seem to get it to work correctly.

Say my url is “http://www.site.com/”. I have a user set up, whose public_html directory is serving pages; let’s say that url is “http://www.site.com/~myUser/theDirectory/”. What I am trying to do is set it so that when you type in “http://www.site.com/theDirectory/” it will actually serve the pages out of “http://www.site.com/~myUser/theDirectory/”, but look like its coming from “http://www.site.com/theDirectory/”. I edited my /etc/apche2/sites-enabled/default file and added these lines:

RewriteEngine On
RewriteRule ^theDirectory/$ /home/myUser/public_html/~myUser/theDirectory/

I also tried various versions of the rule:

RewriteRule ^/theDirectory/$ /home/myUser/public_html/theDirectory/
RewriteRule ^/var/www/html/theDirectory/$ /home/myUser/public_html/theDirectory/

I also made sure that the rewrite module was enabled. At first, I was getting this error:

[Fri Jun 17 18:11:35 2011] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/theDirectory

So I created that file, and now I am getting this error:

[Fri Jun 17 23:15:45 2011] [error] [client xxx.xxx.xxx.xxx] Directory index forbidden by Options directive: /var/www/theDirectory/

So, I’m not really sure where to go from here. Any and all advice will be appreciated. Thanks for taking the time to read.

Have a great day 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:45:01+00:00Added an answer on May 23, 2026 at 4:45 am

    Add the following to your virtual host configuration:

    RewriteEngine on
    RewriteRule ^/theDirectory(/.*)$ /home/myUser/public_html/theDirectory$1 [L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can you run jekyll on your own server or does it have to work
Can I make my own jabber server.So that if I run my website xyz
I created my own class but when I try to instantiate it I run
I am trying to make my own Jabber bot but i have run into
I run my own web server for development and, on it, I installed a
Looking to implement VisualSVN but I don't have my own server. I could install
I would like to run my own internal PyPI server, for egg distribution within
what is the requirments to run my own web server, if i bought for
We are developing several web applications to run on our own server that will
I did this code for my own server in php5, but when I tried

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.