开发者

Multiple conflicting htaccess RewriteRules

开发者 https://www.devze.com 2023-03-20 19:20 出处:网络
I\'m trying to have both people\'s profiles at example.com/Sara and a few special pages like example.com/home and /account.

I'm trying to have both people's profiles at example.com/Sara and a few special pages like example.com/home and /account.

How do I make both of my RewriteRules work?

Options +FollowSymLinks
RewriteEngine On

RewriteC开发者_Go百科ond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^(.*)$ ./people.php?s=$1
RewriteRule ^home ./home.php

Thanks!

Edit:

Figured it out...!

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.php -f 
RewriteRule ^(.*)$ $1.php

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^(.*)$ ./people.php?s=$1


Figured it out...!

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.php -f 
RewriteRule ^(.*)$ $1.php

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^(.*)$ ./people.php?s=$1
0

精彩评论

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