RewriteRule 实际上不适用于 xampp
RewriteRule not actually work with xampp
我在 .htacces 中挥动了以下代码:
Options -MultiViews
RewriteEngine on
RewriteBase /app/
RewriteRule ^login/?$ login.php [NC,L]
RewriteRule ^register/?$ register.php [NC,L]
RewriteRule ^recover/?$ recover.php [NC,L]
RewriteRule ^all/?$ home.php [NC,L]
RewriteRule ^chats/?$ chats.php [NC,L]
RewriteRule ^manage-photos/?$ manage-photos.php [NC,L]
RewriteRule ^friends/?$ friends.php [NC,L]
RewriteRule ^upgrades/?$ upgrades.php [NC,L]
RewriteRule ^profile/([0-9]+)$ profile.php?id= [NC,L]
RewriteRule ^gifts/([0-9]+)$ gifts.php?id= [NC,L]
RewriteRule ^friends/([0-9]+)$ friends.php?id= [NC,L]
RewriteRule ^chat/([0-9]+)$ chat.php?id= [NC,L]
RewriteRule ^page/([0-9]+)$ page.php?id= [NC,L]
RewriteRule ^settings/?$ settings.php [NC,L]
RewriteRule ^preferences/?$ preferences.php [NC,L]
RewriteRule ^profile-views/?$ profile-views.php [NC,L]
RewriteRule ^hot-list/?$ hot-list.php [NC,L]
RewriteRule ^process/([A-Za-z0-9]+)$ process.php?t= [NC,L]
我有 xampp 工作,该模块在 httpd.conf 中启用。
我在这个 conf 中有代码:
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<directory />
Require all denied
AllowOverride none
</directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
我没有改变这个,所有其他的AllowOverride都是! ,这是我的问题,在每个 link 上我都找不到对象。
我想要的是 www.mydomain.com/site/APP/LOGIN 可用,ori www.mydomain.com/site/APP/LOGIN/profile/20 而不是 profile.php?id=$1。
泰
RewriteBase subfolder/app/
RewriteRule login/?$ login.php [NC,L]
因为所有内容都在子文件夹中:)
我在 .htacces 中挥动了以下代码:
Options -MultiViews
RewriteEngine on
RewriteBase /app/
RewriteRule ^login/?$ login.php [NC,L]
RewriteRule ^register/?$ register.php [NC,L]
RewriteRule ^recover/?$ recover.php [NC,L]
RewriteRule ^all/?$ home.php [NC,L]
RewriteRule ^chats/?$ chats.php [NC,L]
RewriteRule ^manage-photos/?$ manage-photos.php [NC,L]
RewriteRule ^friends/?$ friends.php [NC,L]
RewriteRule ^upgrades/?$ upgrades.php [NC,L]
RewriteRule ^profile/([0-9]+)$ profile.php?id= [NC,L]
RewriteRule ^gifts/([0-9]+)$ gifts.php?id= [NC,L]
RewriteRule ^friends/([0-9]+)$ friends.php?id= [NC,L]
RewriteRule ^chat/([0-9]+)$ chat.php?id= [NC,L]
RewriteRule ^page/([0-9]+)$ page.php?id= [NC,L]
RewriteRule ^settings/?$ settings.php [NC,L]
RewriteRule ^preferences/?$ preferences.php [NC,L]
RewriteRule ^profile-views/?$ profile-views.php [NC,L]
RewriteRule ^hot-list/?$ hot-list.php [NC,L]
RewriteRule ^process/([A-Za-z0-9]+)$ process.php?t= [NC,L]
我有 xampp 工作,该模块在 httpd.conf 中启用。 我在这个 conf 中有代码:
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<directory />
Require all denied
AllowOverride none
</directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
我没有改变这个,所有其他的AllowOverride都是! ,这是我的问题,在每个 link 上我都找不到对象。 我想要的是 www.mydomain.com/site/APP/LOGIN 可用,ori www.mydomain.com/site/APP/LOGIN/profile/20 而不是 profile.php?id=$1。 泰
RewriteBase subfolder/app/
RewriteRule login/?$ login.php [NC,L]
因为所有内容都在子文件夹中:)