localhost/visvabharati/archive.html/type/notice
this is my url.I want it to rewrite as
localhost/visvabharati/archive.php?type=notice
Please help me how would be the htaccess
currently using
AddHandler x-mapp-php5 .php
Options +FollowSymLinks
RewriteEngine on
#RewriteBase /
DirectoryIndex index.php?url_key=index [T=application/x-httpd-php,L]
RewriteRule ^([^/]*).html$ /index.php?url_key=$1 [T=application/x-httpd-php,L]
RewriteRule ^([^/]*).html-([^/]*)$ /index.php?url_key=$1&id=$2 [T=application/x-httpd-php,L]
But its giving 500. Please Help me sort it out Regards
This code here will do it for one page.
RewriteRule ^localhost/visvabharati/archive.html/(.+)/(.+) localhost/visvabharati/archive.php?$1=$2
If you need to do this for multiple pages, this should work.
RewriteRule ^localhost/visvabharati/(.+).html/(.+)/(.+) localhost/visvabharati/$1.php?$2=$3
Assuming visvabharati
is a directory.
Place this in /visvabharati/.htaccess
:
RewriteEngine on
RewriteBase /visvabharati/
RewriteRule ^([^.]+)\.html/([^/]+)/([^/]+)/?$ $1.php?$2=$3 [L,QSA,NC]
Also you need to remove all the code shown in your question.