我想用mod重写制作好的URL地址。我正在使用子域名,我想要更改的页面是: http://skola.sharedgames.eu/subdom/skola/clanky/podrobnosti_o_clanku.php?nazov_clanku=jjjhh
我想做类似的事情: http://skola.sharedgames.eu/subdom/skola/clanky/jjjhh
我尝试将它放入.htaccess文件但没有任何事情发生
# htaccess rules for subdomains and aliases
# to create new subdomain, create a folder www/subdom/(subdomain name)
# to create web for alias, create a folder www/domains/(whole domain name)
RewriteEngine On
RewriteRule ^([^/]*)\?$ /subdom/skola/clanky/podrobnosti_o_clanku.php?nazov_clanku=$1 [L]
RewriteCond %{REQUEST_URI} !^domains/
RewriteCond %{REQUEST_URI} !^/domains/
RewriteCond %{HTTP_HOST} ^(www\.)?(.*)$
RewriteCond %{DOCUMENT_ROOT}/domains/%2 -d
RewriteRule (.*) domains/%2/$1 [DPI]
RewriteCond %{REQUEST_URI} !^subdom/
RewriteCond %{REQUEST_URI} !^/subdom/
RewriteCond %{HTTP_HOST} ^(www\.)?(.*)\.([^\.]*)\.([^\.]*)$
RewriteCond %{DOCUMENT_ROOT}/subdom/%2 -d
RewriteRule (.*) subdom/%2/$1 [DPI]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^domains/[^/]+/(.+[^/])$ /$1/ [R]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^subdom/[^/]+/(.+[^/])$ /$1/ [R]