Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
apache: /page/ instead of page.php (mod_rewrite?)
Old 08-06-2009, 01:20 PM apache: /page/ instead of page.php (mod_rewrite?)
Junior Talker

Posts: 2
Trades: 0
Hi,
I want to set up apache in a way, that instead of displaying pages (signup.php, register.php, something_else.php), it displays (/signup/, /register/) etc.. in the address bar. I'm not familiar with mod_rewrite, but as far as I understood, that's what I'll need. Can you please point me in the right direction? Thanks!
rotten_yellow is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-06-2009, 02:02 PM Re: apache: /page/ instead of page.php (mod_rewrite?)
freeloader's Avatar
Experienced Talker

Posts: 35
Trades: 0
Code:
# seamlessly rewrite /something/ to /something.php
RewriteRule ^(.*)/ $1.php
Above is untested and crafted without knowledge, but a handy reference. If you request /signup/, it replies with the code of /signup.php etc.

You put that in your .htaccess file.

HTH,
__________________
"It is a profitable thing, if one is wise, to seem foolish." --Aeschylus

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
freeloader is offline
Reply With Quote
View Public Profile
 
Old 08-06-2009, 09:31 PM Re: apache: /page/ instead of page.php (mod_rewrite?)
Junior Talker

Posts: 2
Trades: 0
Thanks for that! It didn't work out in my case. The problem is, somebody gave me a site, what I need to update. The site's "include" files are in different directory, outside of document root, whenever I click on a link, I get 404, so I think the apache for the person was setup in a different way, because all the links point to '/something/', but the actual files are in '../different_dir/pages/something.php', so I'm not sure how to set this up, any guidance please? Thanks
rotten_yellow is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to apache: /page/ instead of page.php (mod_rewrite?)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.44751 seconds with 12 queries