Vote Up 0 Vote Down

htaccess redirection and file location

Hi can any one change the url

http://localhost/cssmenu/posts/?p=asd


to

http://localhost/cssmenu/asd


with .htaccess? and the htaccess should be placed in cssmenu folder. thank you
flag
edited on 23/8/14

Answers


Vote Up 0 Vote Down
RewriteEngine On
RewriteRule ^/about\_us\.html$ index.php?action=about\_us [NC]
flag | link |
Vote Up 0 Vote Down
RewriteCond %{HTTP\_HOST} ^http://localhost/cssmenu/posts/?p=asd$
RewriteRule ^public\_html\/learntrix\.com$ "http://localhost/cssmenu/asd" [R=301,L]
flag | link |
Vote Up 0 Vote Down
This may help you

 <files .htaccess="">
order allow,deny
deny from all
</files><ifmodule mod_rewrite.c="">
Options +FollowSymLinks -Multiviews
RewriteEngine On

# http://localhost/cssmenu/posts/?p=asd
RewriteRule ^asd/(.*)\.php posts?p=$1

</ifmodule>
flag | link |
Vote Up 0 Vote Down
Options +FollowSymlinks <ifmodule mod_rewrite.c=""> RewriteEngine On RewriteRule posts/([a-zA-Z ]+)$ posts/index.php?p=$1 [NC,L] </ifmodule>
flag | link |

Your Answer

Login before answering

Login with facebook