Reputation: 1006
/etc/apache2/sites-available/default.conf reads:
<Directory>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>
I have mod_rewrite enabled
Under /var/www/sitename I have my .htaccess file which reads:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
Yet, when access localhost/sitename/directory I get a 404 error
What am I missing here?
Upvotes: 0
Views: 3359
Reputation: 1
try this -
Options +FollowSymLinks
RewriteEngine on
RewriteRule process-id-(.*)\.htm$ process.php?id=$1
Upvotes: 0
Reputation: 33
Try adding RewriteRule ^(directory)($|/) - [L]
above the first RewriteCond
so it will exclude the directory from RewriteRule
you can add more than 1 directory by seperating them with |
like RewriteRule ^(forum|extras)($|/) - [L]
Here is an example:
RewriteEngine On
RewriteBase /
RewriteRule ^(directory)($|/) - [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
Upvotes: 0