开发者

URL Rewriting-Page display - rewrite rule in .htaccess

开发者 https://www.devze.com 2023-01-08 02:09 出处:网络
For URL Rewriting, i have got the output for static URL But , for dynamic URL , i am getting partial output only.

For URL Rewriting, i have got the output for static URL But , for dynamic URL , i am getting partial output only. I have placed the .htaccess file in the root directory only. Here is the code:

Options +开发者_如何学编程FollowSymLinks RewriteEngine on RewriteRule ^booking/price/([0-9]+)/?$ booking.php?price=$1

What will be the solution ?


Options +FollowSymLinks
RewriteEngine on
RewriteRule ^booking/([0-9]+)/?$ booking.php?price=$1
RewriteRule ^booking/([0-9]+)/([0-9]+)/?$ booking.php?price=$1&pass=$2

You really want to customise your code for these though so as to be able to use general rules, rather than converting specific paths to use $_GET.


Options +FollowSymLinks RewriteEngine on RewriteRule ^booking/([0-9]+)/?$ booking.php?price=$1 RewriteRule ^booking/([0-9]+)/([0-9]+)/?$ booking.php?price=$1&pass=$2

For images and Css you need to define your base folder in htaccess file as RewriteBase /~your folder/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号