ViktorR
ViktorR

Reputation: 137

Mod_rewrite not redirecting properly

first of all I know there are questions about my problem I tried few of them, but unsuccessfully.
I am trying to get:

http://example.com/project/text

from

http://example.com/projects.php?c=text

I have this .htaccess:

RewriteEngine on
RewriteRule ^project/(.*)$ projects.php?c=$1 [L,QSA] 
ErrorDocument 404 404.php

When I open the site i.e. http://example.com/project/123456 I get nothing(Blank site).
Thank you for you help.

Upvotes: 1

Views: 62

Answers (1)

anubhava
anubhava

Reputation: 785156

You can try:

ErrorDocument 404 404.php
RewriteEngine on
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^project/(.+)$ projects.php?c=$1 [L,QSA,NC]

Upvotes: 1

Related Questions