Fabio Rossi
Fabio Rossi

Reputation: 33

redirect 301 send me to the absolute path of the website

My problem is the following:

Here is my website put into the www root of wamp

Here my directives for the redirect 301

RewriteEngine On  
RewriteRule ^mission/?$ mission.php [R=301]
RewriteRule ^contatti/?$ contatti.php [R=301]
RewriteRule ^page/([^/]+)/?$ page.php?slug=$1 [R=301]
RewriteRule ^page/single/([^/]+)/?$ single.php?titolo=$1 [R=301]
RewriteRule ^admin/?$ admin/login.php [R=301]

If i type the redirected url, the original url appears

i.e.

type

http://root/page/recensioni

appears

http://root/page.php?slug=recensioni

Upvotes: 0

Views: 163

Answers (1)

CreatoR
CreatoR

Reputation: 1652

Try this (client don't see changes in url, but loading correct file for processing request)

RewriteEngine On  
RewriteRule ^mission/?$ mission.php [L]
RewriteRule ^contatti/?$ contatti.php [L]
RewriteRule ^page/([^/]+)/?$ page.php?slug=$1 [L]
RewriteRule ^page/single/([^/]+)/?$ single.php?titolo=$1 [L]
RewriteRule ^admin/?$ admin/login.php [L]

Upvotes: 1

Related Questions