开发者

Problem with .htaccess a very peculiar case

开发者 https://www.devze.com 2023-03-24 23:39 出处:网络
I am using .htaccess and mod_rewrite to make URLs in my application more user friendly. I have a page myapp.com/register.php and I us开发者_运维技巧e the below in .htaccess to make it work like myapp

I am using .htaccess and mod_rewrite to make URLs in my application more user friendly.

I have a page myapp.com/register.php and I us开发者_运维技巧e the below in .htaccess to make it work like myapp.com/register:

RewriteEngine on 
Options +FollowSymLinks 
RewriteBase /
RewriteRule ^register/$ register.php

It doesn't work, but when I change the code like:

RewriteEngine on 
Options +FollowSymLinks 
RewriteBase /
RewriteRule ^aregister/$ register.php

Then access the url myapp.com/register the page gets loaded fine.

Is this a peculiar case? Or am I doing it wrong? Please suggest.

0

精彩评论

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