hello, i need help. i have a bit problem for my site. i want to rewrite my permalink URL from this : mysite.com/detail.php?title={Article Title} to this : mysite.com/{Article Title} and if visitor use this URL : mysite.com/{Article Title} it will be processed by the detail.php?title={Article Title} thank you.
If you use Apache server, you can add something like this in your .htaccess file RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php Code (markup): This is just a sample. Adjust it to fit your need. Whatever in the URL will calls to "index.php". Then you can read the url from $_SERVER['REQUEST_URI'] and to load whatever content you need.
Hi! Try These Commands: Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^articletitle/ /detail.php?title=articletitle ErrorDocument 404 http://www.yousite.com/ ErrorDocument 403 http://www.yousite.com/ ErrorDocument 500 http://www.yousite.com/ ErrorDocument 401 http://www.yousite.com/ Code (markup):
wow, thanks ! i'am still ab it confused, but will try it trough. Thanks wow..nice, gonna try it. Thanks
Well! Create a Page For "404" Like: "sorry.php" ErrorDocument 404 http://www.yousite.com/sorry.php Or U Can Redirect It To Your Home Page With Full Path. ErrorDocument 404 http://www.yousite.com/ But! Be Sure It's 404 Else Use Other ErrorDocument Code Like 403, 500, 401 etc...
yes, i have make a 404 page. but, the main rewrite is not functioning. when i test mysite.com/title1 , the result is 404.
If your mod-rewrite is available,pls try to put below code in your .htaccess file: RewriteEngine On RewriteRule ^(.*?)$ detail.php?title=$1 [L]