Permalink - I need help.. plz

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
muslimsg
Forum Newbie
Posts: 2
Joined: Tue Feb 15, 2011 3:45 am

Permalink - I need help.. plz

Post by muslimsg »

hello guys

I am new here,
I am creating dynamic pages and storing page name like About Us, Products.. etc in database
Under it I create sub pages like About Us---> History. I am storing "History" title in database. Each title has its own unique ID

I need something like this: When a user want to open History page, the URL in address bar should be like this

http://www.mydomain.com/About-Us/History
or
http://www.mydomain.com/About-Us/History.html

I know this can be done by mod_rewrite in .htaccess... I am seeing many example on net but nothing working for me...

any help in this regard will be highly appreciated..

regards
cpetercarter
Forum Contributor
Posts: 474
Joined: Sat Jul 25, 2009 2:00 am

Re: Permalink - I need help.. plz

Post by cpetercarter »

Check, first, do you have an Apache web server? Is mod_rewite installed (look for "mod_rewrite" in Apache2 Handler - loaded modules in phpinfo())? Is your server configured to look for .htaccess files - ie does the Apache configuration file for your site include the setting "AllowOverride All"? You may need to ask your webhost about this. If the answer to any of these questions is "no", then - sorry - url rewriting simply will not work on your site. But if the answers are "yes", and you still cannot get rewriting to work, post again on the forum and either I or another member will try to help.
muslimsg
Forum Newbie
Posts: 2
Joined: Tue Feb 15, 2011 3:45 am

Re: Permalink - I need help.. plz

Post by muslimsg »

YES I have all this enabled...

cpetercarter wrote:Check, first, do you have an Apache web server? Is mod_rewite installed (look for "mod_rewrite" in Apache2 Handler - loaded modules in phpinfo())? Is your server configured to look for .htaccess files - ie does the Apache configuration file for your site include the setting "AllowOverride All"? You may need to ask your webhost about this. If the answer to any of these questions is "no", then - sorry - url rewriting simply will not work on your site. But if the answers are "yes", and you still cannot get rewriting to work, post again on the forum and either I or another member will try to help.
Post Reply