I want:
domain.com/example
to target:
domain.com/folder/example.cshtml
Can anyone help me with the rewrite rule for it?
Every suggestion is much appreciated :)
I have edited the question so that it actually focuses on what is important.
I want:
domain.com/example
to target:
domain.com/folder/example.cshtml
Can anyone help me with the rewrite rule for it?
Every suggestion is much appreciated :)
I have edited the question so that it actually focuses on what is important.
why aren't you using mod-rewrite?
RewriteCond %{THE_REQUEST} /folder/example.cshtml
RewriteRule ^$ /example.cshtml [R=301,L,NE]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^example.cshtml /folder/example.cshtml [L]
Sometimes you need to mess around with the slashes a bit
I guess it can't be done the way i want it.
I'll have to move example.cshtml
to the root directory.