Jump to content

Mod Rewrite One Php File


ctcmedia

Recommended Posts

I want to create a SEO friendly site and I have used mod rewrite(even though i dont know how to work it) to arrange the vars for me but as I am making custom functions I thought I would make a viewController and I want to use the following code

 

<?php 

// Example URL http://localhost/page/227/more/772
$urlVar = explode("/",$HTTP_SERVER_VARS['PATH_INFO']);
$page = $urlVar[1];
$extra = $urlVar[3];
?>

 

So what I am looking for is for the mod rewrite to just access the index.php and the php script will detect vars etc....

 

Is it possible? can you help?

 

Thanks

 

Paul

Link to comment
https://forums.phpfreaks.com/topic/180277-mod-rewrite-one-php-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.