开发者

RewriteRule to file in folder?

开发者 https://www.devze.com 2023-02-21 16:41 出处:网络
I made a htaccess file which I use on other website, but this time it doesn\'t work. I have; RewriteRule ^this$ testarea/that.php

I made a htaccess file which I use on other website, but this time it doesn't work.

I have;

RewriteRule ^this$ testarea/that.php

But it doesn't find the file, it gives an empty page.

How can I redirect an url to a file in a folder?

Thanks in advance!

Update:

Options +FollowSymLinks  
RewriteEngine on  
RewriteRule ^this$ testarea/that.php

This is all I have in my .htaccess file.

I want my url to look like;

www.mywebsite.ext/this

instead of;

www.mywebsite.ext/testarea/that.php

Thats all I want.

The .htaccess works now, the problem was that I sa开发者_运维百科ved it as a wrong file extension..

But now the images and stylesheets won't work, how can I fix this?


The .htaccess works now, the problem was that I saved it as a wrong file extension..
'But now the images and stylesheets won't work, how can I fix this?'
I fixed this problem by adding the <base ... tag..

0

精彩评论

暂无评论...
验证码 换一张
取 消