url rewrite problem wamp
for that i have created the url rewrite in the .htaccess inside the login folder ,
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^login$ login.php [NC] # Change feed URL
开发者_如何学编程
but nothing happened ,
what i do now ,
am using wamp..
Check if "AllowOverride" instruction in main "httpd.conf" file allows you to use .htaccess files at all. If not, make it "AllowOverride all" and restart your WampServer.
You may as well follow this tutorial: http://blog.cmstutorials.org/posts/tips-tricks/how-to-make-mod_rewrite-work-on-wamp
RewriteEngine on
RewriteBase /your-folder-name/ //ADD THIS LINE
RewriteRule ^login$ login.php [NC] # Change feed URL
Change AllowOverride None to AllowOverride All in httpd.conf file, then restart wamp.
For anyone who had the problem of getting the Url rewrite to work in Wordpress - I followed the instructions from @naivists - changing the httpd.conf and using the WAMP menu to turn on the rewrite. However I only got the urls working in Wordpress after adding a .htaccss file to the root of my site. I just copied the basic one from here: https://codex.wordpress.org/htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Note that windows doesn't let you CREATE a .htaccss file (it wants something in front of the dot), but it doesn't mind if you just copy and paste one from somewhere else.
精彩评论