# Apache mod\_rewrite

**URL:** <https://forum.kirupa.com/t/apache-mod-rewrite/181160>\
**Category:** programming\
**Created:** [March 6, 2006, 11:48pm UTC](https://forum.kirupa.com/t/apache-mod-rewrite/181160 "2006-03-06T23:48:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ironikart](https://avatars.discourse-cdn.com/v4/letter/i/7feea3/32.png) [@ironikart](https://forum.kirupa.com/u/ironikart)\
**Post date:** [March 6, 2006, 11:48pm UTC](https://forum.kirupa.com/t/apache-mod-rewrite/181160/1 "2006-03-06T23:48:15Z")

</div>

Hi All,

I need to replicate an alias directive within a .htaccess file (on a shared host, don’t have access to my hosts apache conf).

The directive is as follows:

```auto

Alias "/" "/var/www/core/web/index.php/"

```

I’ve tried various configurations of mod rewrite, but it’s not doing what I want. I’m a fish out of water with some of the more specific apache stuff… hoping we’ve got someone here who can help.

This has got me part of the way there:

```auto

Options +FollowSymLinks
RewriteEngine On

DirectoryIndex index.php

#Set the base uri
RewriteBase /mysource_matrix
#Now do some rules for redirection
#if index, don't redirect (again)
RewriteRule index.php -
#don't redirect double-underscore dirs (symbolic links)
RewriteRule __lib -
RewriteRule __data -
RewriteRule __fudge -
#redirect everything else to index.php
RewriteRule (.*) index.php/$1 [L]

```

I get apache 500 internal server error when trying to use this - the problem is the last line - it’s supposed to write to a index.php symbolic link in the web root… but, it doesn’t. I’ve tried re-writing it directly to the file and that produces the same problem.
