我想更改网址
My Url
http://localhost/MotoMate/corporate/company/kenstar http://localhost/MotoMate/corporate/company/kenstar
我的目标网址将是
http://localhost/MotoMate/kenstar http://localhost/MotoMate/kenstar
**I am using .htacees file:-**
RewriteEngine on
RewriteBase /MotoMate/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|js|img|css|captcha|robots\.txt)
RewriteRule ^(.*)$ /MotoMate/index.php/$1 [L]
#AuthType Basic
#require valid-user
#Allow valid-user
#Deny from all
#Allow from env=test_uri
#Allow from env=live_url
#Satisfy any Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteRule ^corporate/(.*)$ /$1 [L,NC,R]
RewriteRule ^company/(.*)$ /$1 [L,NC,R]
但这不起作用。不改变
试试这个代码/Moto/.htaccess
:
RewriteEngine on
RewriteBase /MotoMate/
RewriteCond %{THE_REQUEST} /corporate/company/(\S*)\s [NC]
RewriteRule ^ /%1? [R=302,L,NE]
RewriteRule !^corporate/company/ corporate/company/$1 [L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|js|img|css|captcha|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)