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!
RewriteEngine On
RewriteRule ^/pages/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/$ /pages.php?sid=$1&catid=$2&page=$3&mode=$4
If you wanted to use my class, it'd be ideal for if you wanted words in your url. Such as /dir/pages/1/category-name/2/page-name/3/mode-name
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Run that on your page and see what it returns for you. See if the page is correct. In your mod rewrite rule, the first set of () is captured by $1 and the second set is captured by $2.. etc.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Order deny,allow
allow from 127.0.0.1
deny from all
RewriteEngine On
RewriteRule ^pages/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ pages.php?sid=$1&catid=$2&page=$3&mode=$4
Order deny,allow
allow from 127.0.0.1
deny from all
RewriteEngine On
RewriteRule ^pages/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ pages.php?sid=$1&catid=$2&page=$3&mode=$4
There is no mention of mod_rewrite in phpinfo(); how do i confirm if mod_rewrite is enabled. Because i suspect it's still not enabled or loaded or something!
Order deny,allow
allow from 127.0.0.1
deny from all
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^pages/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)(/*)$ pages.php?sid=$1&catid=$2&page=$3&mode=$4
RewriteRule ^pages/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ pages.php?sid=$1&catid=$2&page=$3&mode=$4
</IfModule>
Order deny,allow
allow from 127.0.0.1
deny from all
<IfModule mod_rewrite.c>
Options +FollowSymLinks
AllowOverride All
RewriteEngine On
RewriteRule ^pages/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)(/*)$ pages.php?sid=$1&catid=$2&page=$3&mode=$4
RewriteRule ^pages/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ pages.php?sid=$1&catid=$2&page=$3&mode=$4
</IfModule>
Assuming your htdocs is located at C:\Program Files\Apache Group\Apache2\htdocs :
Somewhere you should see something like <Directory "C:/Program Files/Apache Group/Apache2/htdocs"> - its within that block segment you should add/modify to AllowOverride All.
<Directory "C:/Program Files/Apache Group/Apache2/htdocs">
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
</Directory>