apache - URL rewrite using htaccess in PHP -
I am trying to use the STO friendly URL to use the htaccess rewrite rules. Please search them below
option + rewrite engine on follow-up links ^ ReadRet Rule ^ Brand Brands.FPP [NC, L] Rev. ^ Facebook ([0- 9] +) facebook.php? Fb_page_id = $ 1 [NC, L] RewriteRule ^ twitter / ([0- 9a-zA-Z] +) twitter.php? Twitter_screen_name = $ 1 [nc, l]
I have verified all the links in my localhost that they are working in Xampp environment, but when I have them in the remote server, Hosted with virtualhost configuration for subdomain and
My original url will look like below.
base_url / facebook.php / fb_page_name = 7up + India based_burbal / twitter. Php / twitter_screen_name = 7up + India
The rules are not working and are providing an internal server error as below.
In the internal server error server encountered an internal error or misconfiguration and unable to complete your request, please contact the server administrator, route @ localhost and about the error You can tell, and whatever may be the reason for the error, the more information about this error may be available in the server error log. Enter the code here
So I verified with the usual htaccess redirection rules in the remote server on the main site as below. It worked perfectly, I did not know what happened wrong.
301 / http://example.com/
Redirect my original URL format to http://example.com/ Calling URL format in facebook.php / fb_page_name = 7up + India
This was href = '/ facebook / 7up + India'
The last hope URL was http: // example .com / facebook / 7up + India
Try the code below:
< Pre> option + rewrite link on revert engine ^ brand $ brand.phip [nc, l] revised rule ^ facebook / ([0-9] +) $ facebook.php? Fb_page_id = $ 1 [NC, L] Rewrite Rule ^ Twitter / ([0- 9A-GAA-Z ++) $ Twitter .php? Twitter_screen_name = $ 1 [nc, l]
You forgot to add $
, which indicates the end of regular expressions.
Comments
Post a Comment