•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the *nix Software section within the Tech Talk category of DaniWeb, a massive community of 456,571 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,609 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our *nix Software advertiser: Lunarpages Linux Web Hosting
Views: 949 | Replies: 3
![]() |
Hello,
I need some help in url rewrite i tried alot but not able to get this done.
Have a look at url
http://www.mydomain.com/insurance/me....php?cat_id=44
I need to rewrite to make html file
Below is the code I m using but no success
Options +FollowSymLinks
RewriteEngine on
RewriteRule metatags-cat_id-(.*)\.htm$ metatags.php?cat_id=$1
Also DO i need add / write some code in php file also to make this work ?
One guy said have u just added .htaccess
I relied: yes
he said then this will not work
SO Can any one help me out with this.
Thanks
DSS
I need some help in url rewrite i tried alot but not able to get this done.
Have a look at url
http://www.mydomain.com/insurance/me....php?cat_id=44
I need to rewrite to make html file
Below is the code I m using but no success
Options +FollowSymLinks
RewriteEngine on
RewriteRule metatags-cat_id-(.*)\.htm$ metatags.php?cat_id=$1
Also DO i need add / write some code in php file also to make this work ?
One guy said have u just added .htaccess
I relied: yes
he said then this will not work
SO Can any one help me out with this.
Thanks
DSS
•
•
Join Date: Aug 2005
Location: somewhere in time
Posts: 81
Reputation:
Rep Power: 4
Solved Threads: 5
Working with mod_rewrite can be tricky, especially if you are working with subdirectories.
Do your hyperlinks use this format? /insurance/metatags-cat_id-44.htm
try this
RewriteRule ^insurance/metatags-cat_id-(.*)\.htm$ insurance/metatags.php?cat_id=$1
it might also work this way:
RewriteRule ^metatags-cat_id-(.*)\.htm$ metatags.php?cat_id=$1
A couple of things you need to know about the .htaccess file.
1. It does not work on a Microsoft server.
2. It will not work with all hosting companies. Some hosting companies disable server overrides.
Do your hyperlinks use this format? /insurance/metatags-cat_id-44.htm
try this
RewriteRule ^insurance/metatags-cat_id-(.*)\.htm$ insurance/metatags.php?cat_id=$1
it might also work this way:
RewriteRule ^metatags-cat_id-(.*)\.htm$ metatags.php?cat_id=$1
A couple of things you need to know about the .htaccess file.
1. It does not work on a Microsoft server.
2. It will not work with all hosting companies. Some hosting companies disable server overrides.
![]() |
•
•
•
•
•
•
•
•
DaniWeb *nix Software Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
ajax asp blog browsing bt business business software developer development devices erp systems experiment firefox india intel internet it japan malware mcafee media microsoft mmorpg mobile applications msdn news office online open-source programming project management publishing python rss search security software software selection spyware sql sun super technology evaluation tips vista warez web wiki windows
- URL Rewrite, passing variables, or some other way??? (Linux Servers and Apache)
- uppercase to lowercase url's (Search Engine Optimization)
- mod rewrite domain (Linux Servers and Apache)
- SMF url rewrite (Existing Scripts)
- mod rewrite problem (tomcat with od_jk as well) (Linux Servers and Apache)
- URL Rewrite in PHP (PHP)
Other Threads in the *nix Software Forum
- Previous Thread: Can anyone help me....Redhat 9 cannot boot......
- Next Thread: Doubt in killing a process


Linear Mode