Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

How to redirect URL of a page by using htaccess

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

How to redirect URL of a page by using htaccess

Postby Biswadeep » Mon Oct 01, 2012 9:34 am

I want to show a generalised URL for any page that is called from the server. The actual page name with .php extension should be hidden. For example:-
http://www.abcd.com/Art-and-Design/Who- ... eat-Artist instead of http://www.eabcd.com/read.php?url=Art-a ... eat-Artist
To do so I used the following code in my .htaccess file:-

RewriteRule ^([a-zA-Z0-9-/]+).html$ read.php?url=$1
RewriteRule ^([a-zA-Z0-9-/]+).html/$ read.php?url=$1

But this code is not working. Please provide any alternate solution or inform about any anomaly if present in this code.
Biswadeep
New php-forum User
New php-forum User
 
Posts: 1
Joined: Mon Oct 01, 2012 9:10 am

Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot] and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron