htaccess, mod_rewrite, 404?

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
I have a piece of code to rewrite pages from "/page/page_name" to "/index.php?page=page_name", but I get a 404 error instead:
Code:
Options +FollowSymLinks 
RewriteEngine on
RewriteBase /

## some other www and /index.php to / redirection

## Page name redirect
RewriteRule ^page/[a-zA-Z0-9_]* ^/index.php?page=$1
 

KSclans

New Member
Messages
197
Reaction score
0
Points
0
I use

RewriteEngine on
RewriteRule ^page/(.*)$ /index.php?user=$1

but not your [a-zA-Z0-9_]
 

tttony

Member
Messages
147
Reaction score
0
Points
16
Code:
Options +FollowSymLinks 
RewriteEngine on
RewriteBase /

## some other www and /index.php to / redirection

## Page name redirect
RewriteRule ^page/?([a-zA-Z0-9_]*)/?$ index.php?page=$1

try with this code, also try without RewriteBase

and tell me...
 

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
thanks, it's working
 
Top